fix(theme-classic): remove redundant title attribute from sidebar CategoryLinkLabel#12064
Open
AkshatRaj00 wants to merge 1 commit into
Open
fix(theme-classic): remove redundant title attribute from sidebar CategoryLinkLabel#12064AkshatRaj00 wants to merge 1 commit into
title attribute from sidebar CategoryLinkLabel#12064AkshatRaj00 wants to merge 1 commit into
Conversation
…egoryLinkLabel
The `title` attribute on `<span>` inside CategoryLinkLabel was identical
to the visible text content. This caused WAVE accessibility tool to flag
a "Redundant title text" alert on all sidebar category items.
For users relying on voice access or screen readers, having a tooltip
that duplicates the visible label provides no additional context and adds
noise to the accessibility tree.
Fix: Remove the `title={label}` prop from the CategoryLinkLabel span.
The visible label text is sufficient for all assistive technologies.
Fixes facebook#11945
✅ [V2]Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
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
Fixes #11945
Problem
The
CategoryLinkLabelcomponent inDocSidebarItem/Category/index.tsxrenders a<span>with atitleattribute whose value is identical to the visible text content:This causes accessibility tools like WAVE to flag a "Redundant title text" alert on every sidebar category item, as reported in #11945. The
titletooltip conveys zero additional information over the visible label text.This also affects Windows Voice Access users — the tool shows two numbers for the same control when issuing "Show Numbers" command, because the duplicate
titlecreates an extra accessible name target (as seen in #11646).Fix
Remove the
title={label}prop fromCategoryLinkLabel. The visible text is already sufficient for all assistive technologies including screen readers, voice control, and keyboard navigation.Impact
Testing
Related Issues