Skip to content

improve aria accessibility of TAB components - #1081

Open
twinklebob wants to merge 2 commits into
robsontenorio:mainfrom
twinklebob:feature/tab-accessibility
Open

twinklebob wants to merge 2 commits into
robsontenorio:mainfrom
twinklebob:feature/tab-accessibility

Conversation

@twinklebob

Copy link
Copy Markdown

add/update some aria fields to try and improve accessibility

still very much WIP, but hoping this goes some way towards solving #882

@twinklebob

Copy link
Copy Markdown
Author

formatting changes removed @robsontenorio

@robsontenorio

Copy link
Copy Markdown
Owner

@twinklebob

What tool do you use to check this information about ARIA? Can you provide an screenshot where it indicates that it is not compliant?

@twinklebob

Copy link
Copy Markdown
Author

@robsontenorio the chrome Lighthouse tool highlights the issue with tabs:

image

There is also an issue with the tablist not being keyboard navigable, but I've at least managed to make it part of the taborder of the page. I'm not a screenreader user, so I don't know how much the keyboard navigation issue will be a problem. More detail regarding the aria tab role can be seen here: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/tab_role

@robsontenorio

robsontenorio commented Apr 17, 2026

Copy link
Copy Markdown
Owner

I am not an expert in ARIA, and most of the components in maryUI follow daisyUI. Therefore, I am unsure if we can achieve 100% compliance and how "expensive" the implementation might be.

In some scenarios daisyUI requires we use a "label" not "div" and so on...
This is required because the way they use CSS on components.

There is a lot of requests on daisy repository asking for aria support.
So, this can be problematic.

@twinklebob

Copy link
Copy Markdown
Author

For sure, daisyUI is a mess here. Their excessive use of fieldsets and labels is just the beginning of it, no doubt. I'm not an expert here either, I'm just trying to get ahead of a WGAC review I'm anticipating on a client's site. I've tried not to do anything that would change any behaviour or UI, just fix obvious aria issues. For instance I'd imagine making the tabs keyboard navigable is too much and is likely to break things for many consumers of the library, but adding the correct aria markup where required should at least improve the situation for screen-reader users. This PR is probably the least problematic of them all.

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