Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.


    Add aria-expanded to add semantic value and styling


    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.