WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Clarification on the banner role not being at the top of a page

for

From: Patrick H. Lauke
Date: Jun 25, 2023 7:48AM


On 25/06/2023 14:44, Ridz Apps wrote:
> Given a left sidebar that seems to match the description of a header (as
> banners ie), would it be semantically correct to wrap the left sidebar with
> a header element (or maybe a section element with role banner?), even
> though it is not at the top of the page? I would like to know what would be
> the best approach to mark up the left sidebar

It's really irrelevant where your containers are *visually* (at the top
of the page or not). You choose the right role/semantic element based on
the content and its purpose/meaning/function, not based on how things
look or are laid out.

P
--
Patrick H. Lauke

https://www.splintered.co.uk/ | https://github.com/patrickhlauke
https://flickr.com/photos/redux/ | https://www.deviantart.com/redux
https://mastodon.social/@patrick_h_lauke | skype: patrick_h_lauke