-
Notifications
You must be signed in to change notification settings - Fork 516
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
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
34487de
New sidebar: accessibility
estelle 5c8e068
Apply sonkar's uggestions
estelle 368e805
Update kumascript/macros/A11yRef.ejs
estelle 2f2ec32
Apply suggestions from code review
estelle 56f3237
Merge branch 'main' into a11ysidebar
estelle 41b3e56
Rewrite a11yref.ejs
estelle 132c88e
Rename A11yRef.ejs to accessibilitySidebar.ejs
estelle a3befe3
Merge branch 'main' into a11ysidebar
estelle 8c133cd
Update and rename accessibilitySidebar.ejs to AccessibilitySidebar.ejs
estelle 2cb835d
Add WCAG to sidebar
estelle ae9b1ab
Merge branch 'main' into a11ysidebar
caugner acb3d01
refactor(macros/AccessibilitySidebar): use fully-qualified slugs
caugner 25579fd
fix(macros/AccessibilitySidebar): use new li.section class
caugner 7d5da60
chore(macros/AccessibilitySidebar): remove unused var
caugner 666b52b
chore(macros/AccessibilitySidebar): remove unused translations
caugner 2335c01
refactor(macros/AccessibilitySidebar): rename subdirectory => directory
caugner d9ea09a
refactor(macros/AccessibilitySidebar): let -> const + new lines
caugner 0502212
refactor(macros/AccessibilitySidebar): pass only directory to renderD…
caugner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
<% | ||
|
||
const text = mdn.localStringMap({ | ||
'en-US': { | ||
"Accessibility" : "Accessibility", | ||
"Guides" : "Guides", | ||
"Information_for_Web_authors" : "Information for web authors", | ||
"Accessibility:_What_users_can_to_to_browse_safely" : "User settings", | ||
"An_overview_of_accessible_web_applications_and_widgets" : "Applications and widgets", | ||
"Keyboard-navigable_JavaScript_widgets" : "Keyboard-navigable widgets", | ||
"Mobile_accessibility_checklist" : "Mobile checklist", | ||
"Understanding_WCAG" : "Understanding WCAG", | ||
"Cognitive_accessibility" : "Cognitive accessibility", | ||
"Accessibility_and_Spacial_Patterns" : "Spacial Patterns", | ||
"Understanding_Colors_and_Luminance" : "Colors and Luminance", | ||
"Seizure_disorders" : "Seizures and physical reactions", | ||
estelle marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"Resources" : "Resources", | ||
"What_is_accessibility" : "What is accessibility?", | ||
"HTML" : "HTML: A good basis for accessibility", | ||
"CSS_and_JavaScript" : "CSS and JavaScript accessibility best practices", | ||
"WAI-ARIA_basics" : "WAI-ARIA basics", | ||
"Multimedia" : "Accessible multimedia", | ||
"Mobile" : "Mobile accessibility", | ||
"ARIA Guides" : "ARIA Guides", | ||
"Annotations" : "Annotations", | ||
"ARIA_Guides" : "Guides", | ||
"ARIA_Live_Regions" : "Live regions", | ||
"ARIA_Screen_Reader_Implementors_Guide" : "Screen reader implementors guide", | ||
"ARIA_Techniques" : "Using ARIA", | ||
"Multipart_labels" : "Multipart labels", | ||
"How_to_file_ARIA-related_bugs" : "How to file bugs", | ||
} | ||
estelle marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}); | ||
|
||
|
||
const locale = env.locale; | ||
const baseURL = `/${locale}/docs/Web/Accessibility/`; | ||
const AriaURL = `/${locale}/docs/Web/Accessibility/ARIA/`; | ||
const LearnURL = `/${locale}/docs/Learn/`; | ||
const cssURL = `/${locale}/docs/Web/CSS/`; | ||
estelle marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
%> | ||
|
||
<section id="Quick_links" data-macro="A11yRef"> | ||
<ol> | ||
<li><a href="<%=baseURL%>"><strong><%=text["Accessibility"]%></strong></a></li> | ||
<li class="toggle"> | ||
<details><summary><%=text["Guides"]%></summary> | ||
<ol> | ||
<li><a href="<%=baseURL%>Information_for_Web_authors"><%=text["Information_for_Web_authors"]%></a></li> | ||
estelle marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<li><a href="<%=baseURL%>Accessibility:_What_users_can_to_to_browse_safely">User settings</a></li> | ||
<li><a href="<%=baseURL%>An_overview_of_accessible_web_applications_and_widgets"><%=text["An_overview_of_accessible_web_applications_and_widgets"]%></a></li> | ||
<li><a href="<%=baseURL%>Keyboard-navigable_JavaScript_widgets">Keyboard-navigable widgets</a></li> | ||
<li><a href="<%=baseURL%>Mobile_accessibility_checklist"><%=text["Mobile_accessibility_checklist"]%></a></li> | ||
<li><a href="<%=baseURL%>Understanding_WCAG"><%=text["Understanding_WCAG"]%></a></li> | ||
<li><a href="<%=baseURL%>Cognitive_accessibility"><%=text["Cognitive_accessibility"]%></a></li> | ||
<li><a href="<%=baseURL%>Accessibility_and_Spacial_Patterns"><%=text["Accessibility_and_Spacial_Patterns"]%></a></li> | ||
<li><a href="<%=baseURL%>Understanding_Colors_and_Luminance"><%=text["Understanding_Colors_and_Luminance"]%></a></li> | ||
<li><a href="<%=baseURL%>Seizure_disorders"><%=text["Seizure_disorders"]%></a></li> | ||
</ol> | ||
</details> | ||
</li> | ||
<li class="toggle"> | ||
<details><summary><%=text["Resources"]%></summary> | ||
<ol> | ||
<li><a href="<%=LearnURL%>What_is_accessibility"><%=text["What_is_accessibility"]%></a></li> | ||
<li><a href="<%=LearnURL%>HTML"><%=text["HTML"]%></a></li> | ||
<li><a href="<%=LearnURL%>CSS_and_JavaScript"><%=text["CSS_and_JavaScript"]%></a></li> | ||
<li><a href="<%=LearnURL%>WAI-ARIA_basics"><%=text["WAI-ARIA_basics"]%></a></li> | ||
<li><a href="<%=LearnURL%>Multimedia"><%=text["Multimedia"]%></a></li> | ||
<li><a href="<%=LearnURL%>Mobile"><%=text["Mobile"]%></a></li> | ||
</ol> | ||
</details> | ||
</li> | ||
<li><a href="<%=AriaURL%>"><strong>ARIA</strong></a></li> | ||
<li class="toggle"> | ||
<details><summary><%=text["ARIA Guides"]%></summary> | ||
<ol> | ||
<li><a href="<%=AriaURL%>Annotations"><%=text["Annotations"]%></a></li> | ||
<li><a href="<%=AriaURL%>ARIA_Guides"><%=text["ARIA_Guides"]%></a></li> | ||
<li><a href="<%=AriaURL%>ARIA_Live_Regions"><%=text["ARIA_Live_Regions"]%></a></li> | ||
<li><a href="<%=AriaURL%>ARIA_Screen_Reader_Implementors_Guide"><%=text["ARIA_Screen_Reader_Implementors_Guide"]%></a></li> | ||
<li><a href="<%=AriaURL%>ARIA_Techniques"><%=text["ARIA_Techniques"]%></a></li> | ||
<li><a href="<%=AriaURL%>Multipart_labels"><%=text["Multipart_labels"]%></a></li> | ||
<li><a href="<%=AriaURL%>How_to_file_ARIA-related_bugs"><%=text["How_to_file_ARIA-related_bugs"]%></a></li> | ||
</ol> | ||
</details> | ||
</li> | ||
<li class="toggle"> | ||
<details><summary>ARIA States and properties</summary> | ||
estelle marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<%-await template("ListSubpagesForSidebar", ['/Web/Accessibility/ARIA/Attributes', true, true])%> | ||
</details> | ||
</li> | ||
<li class="toggle"> | ||
<details><summary>ARIA Roles</summary> | ||
estelle marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<%-await template("ListSubpagesForSidebar", ['/Web/Accessibility/ARIA/Roles', true, true])%> | ||
</details> | ||
</li> | ||
</ol> | ||
</section> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 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
?