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
Use section instead of header in dashboard pages #14873
Conversation
|
Thank you for opening this PR! We appreciate you! For all pull requests coming from third-party forks we will need to A Forem Team member will review this contribution and get back to |
|
@MohamedAsan someone will likely review your PR after the weekend. We do not typically work on the weekends 😊Thanks for your contribution so far. |
|
@MohamedAsan Hello! 👋🏾 |
|
Thank you @benhalpern |
|
Hi @MohamedAsan, there's now a conflict, can you take a look? Something must have been merged ahead of this, sorry for that :( and thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking this one on! It's looking good, but left a note about some further tweaks I think we need to make - let me know if you have any questions at all!
| <section class="crayons-layout" aria-labelledby="header-title"> | ||
| <h1 class="p-2 pb-0 m:p-0 crayons-title" id="header-title">Dashboard » Followers</h1> | ||
| <%= render "actions_mobile" %> | ||
| </header> | ||
| </section> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to make a few further tweaks to get the landmarks all in the place we want -
- This section is part of the main content of the page, so let's move it inside the
main - Excellent plan labelling the section, but I don't think this is necessary in all cases - when a section is labelled, it's added to the landmark regions for screen reader users. In this case I don't think the section is sufficiently important/standalone to merit that, so we can just remove the
aria-labelledby
The same can be applied to the other areas below too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the detailed explanation. Learnt a few things here :) Honestly, I don't know much about accessibility, and I was just resolving the errors shown by axe. I have made the changes as requested. Kindly let me know if those are okay
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making those changes! It's great to see those errors disappearing, and this makes things much better for landmark navigation for screen reader users 😄
If you want to check out some examples of how screen readers allow for landmark navigation, there's a nice article summarising this on w3 - with your changes, people will now be able to get to the main content more easily, and not be confused by the duplicate header! 🌟
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work @MohamedAsan! Thank you :)
|
Thanks so much for your work here @MohamedAsan ! |
|
Thanks a lot for the opportunity to learn and contribute @aitchiss @cmgorton @rhymes @benhalpern @msarit 🙌 |
What type of PR is this? (check all applicable)
Description
Change
<header>to<section>to avoid having two banner landmarks and move it underRelated Tickets & Documents
Resolves #14840
QA Instructions, Screenshots, Recordings
Verified that there are no visual changes in both desktop(Chrome/Safari/Firefox) & mobile browsers(Chrome/Safari)

UI accessibility concerns?
Verified by using screen reader
Added/updated tests?