Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a11y quick wins: Having landmarks for pages/components #149

Open
rajasegar opened this issue Apr 1, 2020 · 4 comments
Open

a11y quick wins: Having landmarks for pages/components #149

rajasegar opened this issue Apr 1, 2020 · 4 comments

Comments

@rajasegar
Copy link

While running through the axe Audit plugin in Chrome I came across these two moderate issues:

1. Document must have one main landmark

Screenshot 2020-04-01 at 11 54 15 AM

2. All page content must be contained by landmarks

Screenshot 2020-04-01 at 11 54 23 AM

@rajasegar
Copy link
Author

rajasegar commented Apr 1, 2020

I tried the following fixes, it worked:

<div class="jumbo">

- <div class="jumbo">
+ <div class="jumbo" role="banner">

<div class="rentals">

- <div class="rentals">
+ <div class="rentals" role="main">

@MelSumner Your thoughts?

@rajasegar
Copy link
Author

Also for the Rentals component, we can go for the semantic component instead of a div

<div class="rentals">

- <div class="rentals">
+ <main class="rentals">

@chancancode
Copy link
Contributor

chancancode commented Apr 1, 2020

Assuming @MelSumner is +1, seems good to me. Same with #148 (comment), we should be making the changes in the source along with brief explanation.

Something like this: "... Since this is going to be the main content of the page, we also gave it the "main" ARIA role to help assistive technologies comprehend our page."

@chancancode
Copy link
Contributor

Ah sorry I didn't see your second comment, I agree it's a better idea to use the main element. That way we won't even have to explain it, since it's the natural thing to do (though if you want to add a short sentence to call it out, I suppose it doesn't hurt also). 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants