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

feat(macros): add Accessibility sidebar #10659

Merged
merged 18 commits into from
Apr 16, 2024
Merged

feat(macros): add Accessibility sidebar #10659

merged 18 commits into from
Apr 16, 2024

Conversation

estelle
Copy link
Member

@estelle estelle commented Mar 7, 2024

Summary

New sidebar for the accessibility section

Problem

There is no sidebar for accessibility. Instead, each page has a variation of:

<section id="Quick_links">
  {{ListSubpagesForSidebar("Web/Accessibility", 1)}}
</section>

Solution

This is a new sidebar for that section. English only, but localization is possible.

Screenshots

Before

Screenshot 2024-03-06 at 10 53 58 PM Screenshot 2024-03-06 at 10 53 48 PM

After

Screenshot 2024-03-06 at 10 47 22 PM Screenshot 2024-03-06 at 10 47 14 PM

How did you test this change?

local build.
new page.

@estelle estelle requested a review from a team as a code owner March 7, 2024 06:54
@github-actions github-actions bot added the macros tracking issues related to kumascript macros label Mar 7, 2024
kumascript/macros/A11yRef.ejs Outdated Show resolved Hide resolved
kumascript/macros/A11yRef.ejs Outdated Show resolved Hide resolved
kumascript/macros/A11yRef.ejs Outdated Show resolved Hide resolved
Co-authored-by: Onkar Ruikar <87750369+OnkarRuikar@users.noreply.github.com>
Co-authored-by: Onkar Ruikar <87750369+OnkarRuikar@users.noreply.github.com>
@caugner caugner changed the title New sidebar: accessibility feat(macros): add Accessibility sidebar Mar 11, 2024
Copy link
Contributor

@caugner caugner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great initiative to add a proper sidebar macro for the accessibility docs! 🙌

Please note that we prefer a more declarative approach for sidebars these days, which declares each section as a list of slugs. See:

Other than that I added some specific suggestions towards a more declarative sidebar.

kumascript/macros/A11yRef.ejs Outdated Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the "*Ref" name pattern has always been a bit non-obvious. Can we rename it to A11ySidebar or (even better, since we don't have to save space) AccessibilitySidebar?

kumascript/macros/A11yRef.ejs Outdated Show resolved Hide resolved
@caugner caugner marked this pull request as draft March 11, 2024 10:03
@estelle
Copy link
Member Author

estelle commented Mar 23, 2024

Screenshot 2024-03-23 at 4 09 14 PM Screenshot 2024-03-23 at 4 09 29 PM

@estelle estelle marked this pull request as ready for review March 23, 2024 23:16
@estelle estelle requested review from caugner and OnkarRuikar March 23, 2024 23:16
Copy link
Contributor

@caugner caugner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall, thanks a lot!

I left some comments, let me know what you think.

kumascript/macros/accessibilitySidebar.ejs Outdated Show resolved Hide resolved
kumascript/macros/accessibilitySidebar.ejs Outdated Show resolved Hide resolved
kumascript/macros/accessibilitySidebar.ejs Outdated Show resolved Hide resolved
kumascript/macros/accessibilitySidebar.ejs Outdated Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Let's uppercase the "A" in "AccessibilitySidebar" for consistency with the other recent sidebar macros.

kumascript/macros/accessibilitySidebar.ejs Outdated Show resolved Hide resolved
kumascript/macros/accessibilitySidebar.ejs Outdated Show resolved Hide resolved
Copy link
Member Author

@estelle estelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Name changed and all suggested edits made.

kumascript/macros/accessibilitySidebar.ejs Outdated Show resolved Hide resolved
kumascript/macros/accessibilitySidebar.ejs Outdated Show resolved Hide resolved
kumascript/macros/accessibilitySidebar.ejs Outdated Show resolved Hide resolved
kumascript/macros/accessibilitySidebar.ejs Outdated Show resolved Hide resolved
@estelle estelle requested a review from caugner March 25, 2024 21:52
@estelle
Copy link
Member Author

estelle commented Apr 3, 2024

mdn/content#32818 is dependent on this PR being merged

@estelle
Copy link
Member Author

estelle commented Apr 5, 2024

Hi @caugner. This is ready for a re-review and, hopefully, a merge. Thanks.

@OnkarRuikar
Copy link
Contributor

@caugner caugner merged commit 0b6e2ae into mdn:main Apr 16, 2024
10 checks passed
@caugner
Copy link
Contributor

caugner commented Apr 16, 2024

Thank you @estelle, great job! 🙌

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

Successfully merging this pull request may close these issues.

3 participants