1×
Become a member
to unlock all features

Create egghead account to access 5000+ tutorials and resources from expert developers.

Create account
Autoplay

    Add aria-expanded to add semantic value and styling

    ariaARIA

    In this lesson, we will be going over the attribute aria-expanded. Instead of using a class like .open we are going to use the aria-expanded attribute to style.

    This accomplished double duty because we have semantic value and visual indicators that a button is open and closed.

    To test this, I opened up Safari and used CMD + F5 to turn VoiceOver on.