Fix Accessibility Violations for Header Icon Links#758
Fix Accessibility Violations for Header Icon Links#758huangkevin-apr wants to merge 1 commit intokubeedge:masterfrom
Conversation
|
Welcome @huangkevin-apr! It looks like this is your first PR to kubeedge/website 🎉 |
Summary of ChangesHello @huangkevin-apr, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the accessibility of the website by resolving critical WCAG 2.1 Level A violations related to icon-only links in the header. By introducing descriptive "aria-label" attributes, the change ensures that screen reader users can now clearly understand the purpose and destination of the GitHub, Twitter/X, and Slack navigation links, thereby improving overall user experience for individuals with visual disabilities without altering the site's visual presentation or introducing any breaking changes. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
Signed-off-by: huangkevin-apr <huangkevinapr@outlook.com>
e32acb0 to
a10e0d8
Compare
There was a problem hiding this comment.
Code Review
This pull request correctly addresses a significant accessibility issue by adding aria-label attributes to icon-only links in the header, making them understandable for screen reader users. The change is well-documented and effectively resolves the reported WCAG violation. My review includes one suggestion to further improve accessibility by internationalizing these new labels, ensuring a consistent experience across all supported languages.
| "aria-label": "GitHub repository", // Accessibility: Add aria-label for icon-only link | ||
| }, | ||
| { | ||
| href: "https://twitter.com/KubeEdge", | ||
| position: "right", | ||
| className: "header-x-link heade-icon", | ||
| "aria-label": "KubeEdge Twitter", // Accessibility: Add aria-label for icon-only link | ||
| }, | ||
| { | ||
| to: "/docs/community/slack", | ||
| position: "right", | ||
| className: "header-slack-link heade-icon", | ||
| "aria-label": "KubeEdge Slack community", // Accessibility: Add aria-label for icon-only link |
There was a problem hiding this comment.
While adding aria-label is a great step for accessibility, these labels are hardcoded in English. Since the site supports internationalization (i18n) for English and Chinese, these labels should also be translated to provide an accessible experience for all users. Currently, a screen reader user on the Chinese version of the site will hear an English label for these links. Please consider making these labels translatable.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: fujitatomoya The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Please check if the PR fulfills these requirements
Which issue(s) this PR fixes:
Fixes #757
What kind of change does this PR introduce?
Bug fix - Accessibility compliance improvement
What is the current behavior?
The three icon-only links in the header navigation (GitHub, Twitter/X, Slack) lack accessible names, causing WCAG 2.1 Level A violations:
Current configuration in
docusaurus.config.js:Screen reader experience:
What is the new behavior?
After this fix, all three icon links have descriptive
aria-labelattributes that screen readers can announce:Updated configuration:
Improved screen reader experience:
Benefits:
Technical implementation:
aria-labelproperty to navbar item configurations indocusaurus.config.jsDoes this PR introduce a breaking change?
No. This PR does not introduce any breaking changes.
Other information:
The patch submitted in this PR was generated by A11YRepair, an automated Web Accessibility repair tool that I developed to address common accessibility violations in web applications. The generated fixes were manually reviewed and validated before submission.