nthiebes/booky.io

Language selection in footer

Closed this issue · 3 comments

This issue is about the design of the language selection in the footer.

If you'd consider this as a possible idea for a "nicer" dropdown, I just checked the mark-up and found something very interesting about it:

A click event listens on Deutschland and the flag img, the elements container got:
aria-haspopup="listbox" and aria-expanded="false" as attributes.

On click, the aria-expandet changes to true, and the ul with all the other languages also has the aria-haspopup="listbox" which creates the connection between the original selection and the pop-up.
This is a valid case of how to use those aria attributes according to: https://www.w3.org/TR/wai-aria/#aria-haspopup and will give us the chance to create a pretty dropdown without the cost of a11y.

bildschirmfoto 2019-02-17 um 10 07 56

I added them directly without dropdown.