DEV Community

Discussion on: 100% Pure HTML/CSS Page Navigation - No JavaScript Required

Collapse
 
equinusocio profile image
Mattia Astorino

Another big caveat is the accessibility. We should use aria-attributes, but at this point we are already using js.

Collapse
 
hakash profile image
Morten Olsrud

Yeah, I'd love to do that, but I havent found a way for CSS selectors to work on aria. I'm also unsure how a screen-reader or braille-board would react to most SPAs to be honest.

Collapse
 
equinusocio profile image
Mattia Astorino

You should probably use the attribute selector [aria-active]{} but as i said, you need js.

Thread Thread
 
hakash profile image
Morten Olsrud

Regardless of JS, that selector was new to me 😊