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

JumpLinks - add aria-labelledby prop and warning for aria labels #9802

Open
thatblindgeye opened this issue Nov 8, 2023 · 0 comments
Open
Labels

Comments

@thatblindgeye
Copy link
Contributor

thatblindgeye commented Nov 8, 2023

Is this a new component or an extension of an existing one?
JumpLinks

Describe the feature
Follow up to comments in patternfly/patternfly-org#3808

Basically right now the default value of the aria-label on JumpLinks is set to the label prop if passed in, and only if label is a string. Ideally we should consider making updates so that:

  • an aria-labelledby prop can be passed in which can be given an id of the label element or some other element that labels the jump links nav.
  • if label is not a string and aria-labelledby is not manually passed in, generate a random id internally that's applied to the label wrapper element (pf-v5-c-jump-links__label), with that id passed to an aria-labelledby attribute on the outer JumpLinks nav element.
  • We could also consider removing the default value of the aria-label prop, but that may need to wait for a breaking change. Rationale here is that it would make more sense to link to the visible text label via aria-labelledby rather than repeat the text in an aria-label; while React is automating that for the consumer, it's only when the label prop is a string and in the HTML implementation there isn't that same automation provided by us

We should also add in a console warning if neither aria-label or aria-labelledby are passed in, otherwise there's a chance that the JumpLinks internal nav has no proper accessible name.

Are there visuals for this feature? If applicable, please include examples for each state and for varying widths
Include screenshots or links to Marvel or other mockups.

Any other information?
A followup will need to be made in org to add verbiage to the a11y docs for JumpLinks

@github-project-automation github-project-automation bot moved this to Needs triage in PatternFly Issues Nov 8, 2023
@wise-king-sullyman wise-king-sullyman moved this from Needs triage to Backlog in PatternFly Issues Nov 17, 2023
@kmcfaul kmcfaul removed the DevX label Oct 25, 2024
@tlabaj tlabaj removed this from the Prioritized Backlog milestone Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Backlog
Development

No branches or pull requests

4 participants