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

Inconsistent Nunjucks parameter names for aria-label #5277

Open
matteason opened this issue Aug 29, 2024 · 0 comments
Open

Inconsistent Nunjucks parameter names for aria-label #5277

matteason opened this issue Aug 29, 2024 · 0 comments
Labels
🐛 bug Something isn't working the way it should (including incorrect wording in documentation) nunjucks

Comments

@matteason
Copy link
Contributor

There are several components which allow you to pass the text for the aria-label on the component's wrapper element. The names of these parameters are inconsistent despite them doing the same thing.

Cookie banner and service navigation use ariaLabel.

Pagination uses landmarkLabel and breadcrumbs uses labelText.

Pagination also includes a visuallyHiddenText param for pagination items. On most components, visuallyHiddenText params are appended to the visible text (for example in summary card actions); pagination is the only example I can find where visuallyHiddenText is passed directly to aria-label, completely overriding any visual label

The documentation for the params is also structured differently. For example the docs for pagination and breadcrumbs don't mention that the value will be used as the aria-label, while they do for cookie banner and service navigation.

Are any of these differences intentional? I think ariaLabel is clearest about what the params actually do, with [thing]AriaLabel for labels of child elements (eg password uses showPasswordAriaLabelText, though again the Text makes that inconsistent)

@matteason matteason added awaiting triage Needs triaging by team 🐛 bug Something isn't working the way it should (including incorrect wording in documentation) labels Aug 29, 2024
@romaricpascal romaricpascal added nunjucks and removed awaiting triage Needs triaging by team labels Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working the way it should (including incorrect wording in documentation) nunjucks
Projects
None yet
Development

No branches or pull requests

2 participants