Closed smohadjer closed 1 year ago
Thanks for the report. Can you submit a PR for this enhancement?
Hi @kartik-v,
Unfortunately moving role="tab" from anchors to list items caused new accessibility issues to appear since an element that is defined as a tab via aria should not have a focusable element like a link inside it. Also we have some other aria attributes on anchor elements that also need to be moved to list item if we move role attribute away from the anchors. After some researching I realized the easiest solution is to add a role="presentation" to list item so assistive technologies understand that this element has no accessibility semantics. This change stopped axe DevTools from showing accessibility issues with my tabs. I have opened a PR here: https://github.com/kartik-v/yii2-tabs-x/pull/83
Merged #83.
@kartik-v Would you release a new version so we can pick up this fix in our project via composer?
@kartik-v Is there any release schedule? I wonder how long we need to wait to pick up this fix.
will release it shortly.... missed this.
The aria role="tab" attribute should be set on list item and not on anchor element, because list item is the direct child of ul element which has the role="tablist" attribute and not the anchor elements. This causes several accessibility issues which are reported by Axe DevTools.