Skip to content

fix(caniuse): add role=img to browser support cells for valid HTML#5176

Open
marcoscaceres wants to merge 2 commits intomainfrom
fix/caniuse-aria-role
Open

fix(caniuse): add role=img to browser support cells for valid HTML#5176
marcoscaceres wants to merge 2 commits intomainfrom
fix/caniuse-aria-role

Conversation

@marcoscaceres
Copy link
Copy Markdown
Contributor

The div elements with aria-label lacked a role attribute, violating HTML spec per the Nu validator. Added role=img since the aria-label fully describes the visual content. Set inner img alt to empty to avoid double-announcement.

Closes #5091

The div has aria-label with the full description, so children are
presentational. Set inner img alt to empty to avoid double-announcement.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes HTML validity for the “Can I Use” browser support cells by ensuring elements with aria-label have an appropriate ARIA role, aligning generated output with Nu validator requirements (per #5091).

Changes:

  • Add role="img" to caniuse browser support cell containers that use aria-label.
  • Make the nested browser logo <img> decorative by setting alt="" to avoid double announcements.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

caniuse insert uses invalid markup

2 participants