Skip to content

[A11Y FEATURE (W0017)]: Detect aria-hidden="true" on interactable elements issue #174#175

Merged
jackdomleo7 merged 3 commits intojackdomleo7:masterfrom
elidakirigo:aria-detect
Sep 2, 2025
Merged

[A11Y FEATURE (W0017)]: Detect aria-hidden="true" on interactable elements issue #174#175
jackdomleo7 merged 3 commits intojackdomleo7:masterfrom
elidakirigo:aria-detect

Conversation

@elidakirigo
Copy link
Contributor

@elidakirigo elidakirigo commented Aug 28, 2025

New A11y Feature: (W0017) #174

Description

this pull request checks whether interactive HTML element & custom interactive elements are being ignored by assistive technologies and screen readers by containing aria-hidden=true. a warning is displayed.

the interactive elements are

a, button, summary, area, audio[controls], iframe, input, select, textarea, video[controls]

custom roles include -
"button", "combobox", "link", "menuitem", "menuitemcheckbox", "menuitemradio", "option", "scrollbar", "searchbox", "slider", "spinbutton", "switch", "tab", "radio", "textbox", "treeitem"

Why is this important?

this is important because -

  1. Screen readers can’t access hidden buttons, links, inputs.
  2. Breaks WCAG compliance
  3. Causes keyboard navigation issues - Users can tab to elements that have no announced role or label.
  4. Creates poor user experience by Leading to confusion for screen reader users.
  5. Legal and compliance risks by Violating accessibility laws and regulations.

Better alternatives exist – Use disabled or aria-disabled instead of aria-hidden on active elements.

Covered test cases

the covered test were 2.

  1. checks if the interactive elements with aria-hidden have a border-color of rgb(255,255,102) - warning color
  2. checks if the HTML element with aria-hidden=true has content containing "WARNING (W0017): Interactive element containing aria-hidden"

Did you test on all major browsers?

  • Chrome
  • Firefox
  • Edge
  • Safari

Other details

N/A

T&Cs

  • I confirm I have read and understand the contributing guidelines
  • I understand the work in this pull request will not be released straight away and will appear in a future release (if approved)
  • I confirm the work in this pull request is true and valid to the best of my knowledge
  • I have updated the README, features.md and codes.md files where applicable

@elidakirigo elidakirigo changed the title [A11Y FEATURE]: Detect aria-hidden="true" on interactable elements issue #174 [A11Y FEATURE (W0017)]: Detect aria-hidden="true" on interactable elements issue #174 Aug 28, 2025
Copy link
Owner

@jackdomleo7 jackdomleo7 left a comment

Choose a reason for hiding this comment

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

Apologies @elidakirigo, I was away on vacation. This looks really good. You've understood the project well and you expanded more on the original feature request! Good job and thanks for contributing.

@jackdomleo7 jackdomleo7 merged commit 6794550 into jackdomleo7:master Sep 2, 2025
3 checks passed
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.

2 participants