feat(adhoc-tools-accessible-names): overwrite accessible name results for some native elements#5960
Merged
feat(adhoc-tools-accessible-names): overwrite accessible name results for some native elements#5960
Conversation
jalkire
approved these changes
Aug 25, 2022
8 tasks
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 
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.
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
yarn null:autoaddyarn fastpassyarn test)<rootDir>/test-results/unit/coveragefix:,chore:,feat(feature-name):,refactor:). SeeCONTRIBUTING.md.