fix: Added a check for a hardcoded aria 'role' value in the same element. #493
fix: Added a check for a hardcoded aria 'role' value in the same element. #493JMac118 wants to merge 1 commit into
Conversation
This will stop it from "guessing" if an element is a navigation or main element if the element has the aria role of 'navigation' or 'main'. It won't need to guess it if it is specifically outlined to be that.
JMac118
left a comment
There was a problem hiding this comment.
When a website has a aria value of 'navigation' or 'main' the extension can still add "guessed" values to the list when it really doesn't need to, which will cause duplicate landmarks in the extension (one actual value, one guessed). This change should stop that.
|
Hi @JMac118. I’m sorry I missed your PR until now, thank you for your contribution! This was an oversight on my part, and needs to be fixed. I have actually for some time been working on a big re-write behind the scenes, which I’m releasing in stages (I just merged the code into Your PR won’t be able to be merged automatically due to the changes I’ve been making - apologies - but I can see how it works, and ensure that these changes are adopted. Ideally it should be possible for me to add to the test suite to highlight some/all of the this oversight in the code. |
|
No problem @matatk Thank you for acknowledging my PR and for the work you are doing on the re-write. I appreciate your efforts to improve the extension. I was working on implementing more accessibility features for a website with an admittedly non-standard way of handling ARIA roles and other accessibility elements, when I came across this issue and couldn't have the extension suppress the "guesses". Since the EU accessibility mandate is being enforced midway through next year, I figured this change would be a good quality of life improvement for the user experience. Would you like me to take a look at matching my changes to the ones you merged into main? |
This will stop it from "guessing" if an element is a navigation or main element if the element has the aria role of 'navigation' or 'main'. It won't need to guess it if it is specifically outlined to be that.