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

Fix incorrect uses of aria-labelledby, replace with data-cy #1705

Merged
merged 14 commits into from
Feb 28, 2022

Conversation

himdel
Copy link
Collaborator

@himdel himdel commented Feb 28, 2022

For providing an ARIA title inline, use aria-label,
aria-labelledby should point to an id of a DOM element providing an actual title.

... but we only use it that way for markdown-title in MarkdownEditor.

The rest of uses should really be data-cy, or are unused now.
We also want to make sure those data-cy attributes are unique enough to be searchable - adding the component name where appropriate.

(since Friday was an accessibility themed learning day :))

For providing an ARIA title inline, use `aria-label`,
`aria-labelledby` should point to an `id` of a DOM element providing an actual title.

..but we only use it that way for `markdown-title` in `MarkdownEditor`.

The rest of uses should really be `data-cy`, or are unused now.
We also want to make sure those `data-cy` attributes are unique enough to be searchable - adding the component name where appropriate.

No-Issue
and drop unused readonly-auth
…table_header

```diff
- [data-cy="table_header"]
- [aria-labelledby="headers"]
+ [data-cy="SortTable-headers"]
```

mostly just `perl -i -npe 's/aria-labelledby=.headers./data-cy="SortTable-headers"/' test/cypress/integration/*js`
@himdel himdel merged commit b157a30 into ansible:master Feb 28, 2022
@himdel himdel deleted the labelledby branch February 28, 2022 18:14
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.

None yet

2 participants