Warning added for headings with role="text" attribute issue #107 - a11y feature#111
Conversation
…into jackdomleo7-master
|
I'm not sure what the linting error is due to, when I do npm run lint it doesn't show anything. Any help would be appreciated. |
jackdomleo7
left a comment
There was a problem hiding this comment.
Some really good stuff here Emma! Just two very very minor changes needed then it's all good to go.
| The highlighted element is a focusable element that is nested within another element with `aria-hidden="true"`. This means the focusable element is inaccessible to assistive technologies. Either remove the `aria-hidden="true"`, or restructure the HTML so that the focusable element is not nested within the element with `aria-hidden="true"`. [Read more about this here](https://web.dev/aria-hidden-focus). No newline at end of file | ||
| The highlighted element is a focusable element that is nested within another element with `aria-hidden="true"`. This means the focusable element is inaccessible to assistive technologies. Either remove the `aria-hidden="true"`, or restructure the HTML so that the focusable element is not nested within the element with `aria-hidden="true"`. [Read more about this here](https://web.dev/aria-hidden-focus). | ||
|
|
||
| ### W0010 |
There was a problem hiding this comment.
Just appears to be missing a - at the beginning.
Also, to stick with consistency, could we use double quotes? role="text" and wrap it in backticks so it is represented as code?
However, this is a good clear description!
There was a problem hiding this comment.
Changes made :)
| }); | ||
| }); | ||
|
|
||
| it('should not have role=text', () => { |
There was a problem hiding this comment.
Thank you for adding this! I've been meaning to get around to refactoring these tests. (No action needed)
|
Thanks for this PR! Yeah you can ignore the linting check (I'll override this when merging) - there's an open issue (#87) that I'm struggling to resolve around this. Also, don't worry about testing Safari, I'm confident this will work. |
Types of changes
Description
This feature adds a warning to any headings h1 - h6 with the role="text" attribute that this will cause a loss of semantic meaning which could impact screen reader users. Resolves: #107
Link(s)
Screenshot(s)
Checklist:
xif you have considered this but thought there was nothing to add or modify).contributorssection inpackage.json(still put anxif you have considered this but decided not to add yourself).test/index.htmlto thetest/index.htmlin themasterbranch).Help
I could not test in Safari because I do not have access to an Apple device.