Skip to content

fix: make Recent News links keyboard accessible - #833

Open
RedZapdos123 wants to merge 3 commits into
kubeedge:masterfrom
RedZapdos123:fix/blogpost-keyboard-accessibility
Open

RedZapdos123 wants to merge 3 commits into
kubeedge:masterfrom
RedZapdos123:fix/blogpost-keyboard-accessibility

Conversation

@RedZapdos123

@RedZapdos123 RedZapdos123 commented Jun 22, 2026

Copy link
Copy Markdown
Contributor
  • Please check if the PR fulfills these requirements
  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Which issue(s) this PR fixes:

Fixes #832

  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

Bug fix

  • What is the current behavior? (You can also link to an open issue here)

The homepage Recent News section uses mouse-only navigation for its main actions. View All is rendered as an anchor with onClick but no href, and each blog post title is rendered as a clickable <h3>, so keyboard users cannot tab to or open the post titles.

  • What is the new behavior (if this is a feature change)?

View All now uses a semantic Docusaurus Link, and each homepage blog post title now renders as a semantic link to the post. Both controls are keyboard focusable and can be activated from the keyboard, with visible focus styling preserved on the homepage.

  • Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

No.

  • Other information:

Verified with corepack yarn build and real homepage keyboard navigation:

  • tabbing from the previous focusable element now lands on View All
  • the next Tab lands on the first blog post title link
  • pressing Enter on the focused title link opens the blog post page
blogpost-after.mp4

Signed-off-by: Mridankan Mandal <xerontitan90@gmail.com>
@kubeedge-bot

Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign shelley-baoyue after the PR has been reviewed.
You can assign the PR to them by writing /assign @shelley-baoyue in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubeedge-bot kubeedge-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jun 22, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the BlogPost component to use Docusaurus's Link component instead of programmatic navigation via useHistory, improving accessibility and SEO. It also replaces array indices with unique permalinks as React keys and updates the styling to support proper focus outlines. The feedback suggests adding display: inline-block to the post link class to ensure a clean, unfragmented focus outline for multi-line titles.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/components/blogPost/index.scss
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: Homepage Recent News blog posts are not keyboard accessible

2 participants