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

feat(adhoc-tools-accessible-names): overwrite accessible name results for some native elements #5960

Merged
merged 6 commits into from
Aug 25, 2022

Conversation

ZakiyaN0
Copy link
Contributor

@ZakiyaN0 ZakiyaN0 commented Aug 24, 2022

Details

This PR adds a check that overwrites some results returned by the getAccessibleText method from axe-core.

Motivation

Upon manually testing some native elements, it was observed that we returned content-derived accessible names for some elements that can only derive their accessible names from author-provided attributes such as aria-label, aria-labelledby, title, among others even when such elements do not have attributes.

Context

Pull request checklist

  • Addresses an existing issue: #0000
  • Ran yarn null:autoadd
  • Ran yarn fastpass
  • Added/updated relevant unit test(s) (and ran yarn test)
  • Verified code coverage for the changes made. Check coverage report at: <rootDir>/test-results/unit/coverage
  • PR title AND final merge commit title both start with a semantic tag (fix:, chore:, feat(feature-name):, refactor:). See CONTRIBUTING.md.
  • (UI changes only) Added screenshots/GIFs to description above
  • (UI changes only) Verified usability with NVDA/JAWS

@ZakiyaN0 ZakiyaN0 requested a review from a team as a code owner August 24, 2022 19:17
@ZakiyaN0 ZakiyaN0 merged commit a8139d3 into main Aug 25, 2022
ZakiyaN0 added a commit that referenced this pull request Aug 29, 2022
#### Details

<!-- Usually a sentence or two describing what the PR changes -->
This PR removes the feature flag under which development of the accessible names feature took place. Although the main goal of this PR is to remove the feature flag, it also contains very small changes related to the "display-accessible-names" rule; with respect to that, this PR adds another native element attribute (summary, to be specific,) check for elements that get their names from author-provided attributes. The PR also includes the addition of the "section" element to the selectors we query.
##### Motivation

<!-- This can be as simple as "addresses issue #123" -->

##### Context
The "summary" attribute check was added to this PR because some elements like table can get their accessible name from the summary attribute. For more information, please refer to PR #5960 
<!-- Are there any parts that you've intentionally left out-of-scope for a later PR to handle? -->

<!-- Were there any alternative approaches you considered? What tradeoffs did you consider? -->

#### Pull request checklist
<!-- If a checklist item is not applicable to this change, write "n/a" in the checkbox -->
- [ ] Addresses an existing issue: #0000
- [x] Ran `yarn null:autoadd`
- [x] Ran `yarn fastpass`
- [x] Added/updated relevant unit test(s) (and ran `yarn test`)
- [x] Verified code coverage for the changes made. Check coverage report at: `<rootDir>/test-results/unit/coverage`
- [x] PR title *AND* final merge commit title both start with a semantic tag (`fix:`, `chore:`, `feat(feature-name):`, `refactor:`). See `CONTRIBUTING.md`.
- [x] (UI changes only) Added screenshots/GIFs to description above
- [ ] (UI changes only) Verified usability with NVDA/JAWS
![rFF](https://user-images.githubusercontent.com/81589466/187256089-984163a5-e904-4e9a-971f-0521e48d54cf.png)
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.

2 participants