fix(a11y): replace aria-hidden button with role=presentation span in EntityTreeNode#143
Closed
R-Hart80 wants to merge 1 commit into
Closed
fix(a11y): replace aria-hidden button with role=presentation span in EntityTreeNode#143R-Hart80 wants to merge 1 commit into
R-Hart80 wants to merge 1 commit into
Conversation
…EntityTreeNode
The expand/collapse chevron was a <button> with both tabIndex={-1} and
aria-hidden="true", causing Chrome DevTools to flag a focus conflict:
"Blocked aria-hidden on an element because its descendant retained focus."
Buttons can still receive focus programmatically (via clicks) even with
tabIndex={-1}, which contradicts aria-hidden. Replacing it with a <span
role="presentation"> removes the element from the accessibility tree
entirely while preserving click functionality for mouse users. Keyboard
navigation is already handled by the parent <li role="treeitem">.
Fixes CatholicOS#100
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
60 tasks
Member
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
<button>expand/collapse chevron inEntityTreeNodewith a<span role="presentation">tabIndex={-1}andaria-hidden="true"combination that caused Chrome DevTools to flag: "Blocked aria-hidden on an element because its descendant retained focus"Why this fix works
A
<button>can still receive focus programmatically (e.g. via mouse click) even withtabIndex={-1}, which contradictsaria-hidden="true". A<span role="presentation">removes the element from the accessibility tree entirely while preserving click functionality for mouse users. Keyboard navigation is already handled by the parent<li role="treeitem">.Test plan
aria-hiddenfocus conflict warningli, no change in behaviorFixes #100
🤖 Generated with Claude Code