besteadfast / carbon

Steadfast's starter project - Craft CMS, Vite, and DDEV
3 stars 2 forks source link

Add aria-expanded and aria-haspopup to expanding menus/accordions #61

Open DrewTJohnson opened 7 months ago

DrewTJohnson commented 7 months ago

For dropdown menus, accordions, or anything else that opens another section in the DOM should have the aria-haspopup and aria-expanded attributes on them.

These attributes tell screen reader users that another section has opened when interacting with typical DOM nodes. The surgery center repos all have this in their main Nav elements that include a dropdown.