Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary role="img" #2704

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Remove unnecessary role="img" #2704

wants to merge 10 commits into from

Conversation

hannahiss
Copy link
Member

@hannahiss hannahiss commented Aug 22, 2024

Note: Please transform - [ ] into - (NA) in the description when things are not applicable

Related issues

#2667

Description

Remove unnecessary role="img" on aria-hidden SVGs or <img>

Motivation & Context

This issue has been seen while fixing a11y audit:

  • aria-hidden images should not have a role
  • tags <img> are used for images only and should not have a role="img"

Types of change

  • Bug fix (non-breaking which fixes an issue)

Live previews

Copy link

netlify bot commented Aug 22, 2024

Deploy Preview for boosted ready!

Name Link
🔨 Latest commit 0ee0a85
🔍 Latest deploy log https://app.netlify.com/sites/boosted/deploys/66fc1d8116c2ac00091541cf
😎 Deploy Preview https://deploy-preview-2704--boosted.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@hannahiss hannahiss changed the title Fix a11y audit: Remove unnecessary role="img" on aria-hidden SVGs Fix a11y audit: Remove unnecessary role="img" Aug 22, 2024
@hannahiss hannahiss added v5 accessibility docs Improvements or additions to documentation labels Aug 22, 2024
@hannahiss hannahiss changed the title Fix a11y audit: Remove unnecessary role="img" Remove unnecessary role="img" Aug 23, 2024
@hannahiss hannahiss marked this pull request as ready for review August 23, 2024 14:48
Copy link
Member

@louismaximepiton louismaximepiton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 is missing also in both orange-global-headers.html and orange-supra.html.

site/content/docs/5.3/dark-mode.md Outdated Show resolved Hide resolved
Copy link
Member

@louismaximepiton louismaximepiton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

Copy link
Member

@julien-deramond julien-deramond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The HTML markup changed (slightly) for the headers, so it might be useful to mention it in the migration guide, isn't it?

(Note: there are some conflicts to resolve in the PR due to other PRs being merged)

@@ -23,10 +23,13 @@ toc: true
#### Buttons
- <span class="badge text-bg-success">New</span> X social button.

#### Orange navbar
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going crazy with all these PRs... This was already done in #2690 here, and in a better way I find... What do you think @julien-deramond

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anyway, I made some changes:

@julien-deramond
Copy link
Member

This branch has conflicts that must be resolved after the recent merges in the main branch

# Conflicts:
#	site/content/docs/5.3/dark-mode.md
#	site/content/docs/5.3/migration.md
#	site/layouts/shortcodes/orange-global-headers.html
#	site/layouts/shortcodes/orange-supra.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility docs Improvements or additions to documentation v5
Projects
Status: Need Lead Dev Review
Development

Successfully merging this pull request may close these issues.

3 participants