Skip to content

Conversation

@malav2110
Copy link
Contributor

Description

Fixes Axe accessibility violations where Learn page content was not contained within semantic HTML landmarks.

Changes Made

  1. MetaBar component - Changed wrapper from <div> to <aside> element with aria-label="Article metadata".
  2. Banner component - Changed from <div> to <section> element with role="region" and aria-label="Announcement".
  3. As changes are in ui-packages directory, ran command: pnpm version patch

Validation (Axe Report)

Before:
Screenshot 2026-01-14 at 11 33 18 PM

After:
Screenshot 2026-01-14 at 11 33 46 PM

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run pnpm format to ensure the code follows the style guide.
  • I have run pnpm test to check if all tests are passing.
  • I have run pnpm build to check if the website builds without errors.
  • I've covered new added functionality with unit tests if necessary.

@malav2110 malav2110 requested a review from a team as a code owner January 15, 2026 06:51
Copilot AI review requested due to automatic review settings January 15, 2026 06:51
@vercel
Copy link

vercel bot commented Jan 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
nodejs-org Ready Ready Preview Jan 16, 2026 1:41am

Review with Vercel Agent

@github-actions
Copy link
Contributor

👋 Codeowner Review Request

The following codeowners have been identified for the changed files:

Team reviewers: @nodejs/nodejs-website

Please review the changes when you have a chance. Thank you! 🙏

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes accessibility violations on the Learn page by replacing non-semantic <div> elements with semantic HTML landmarks, addressing Axe accessibility issues.

Changes:

  • Changed MetaBar wrapper from <div> to <aside> element with aria-label="Article metadata"
  • Changed Banner wrapper from <div> to <section> element with role="region" and aria-label="Announcement"
  • Bumped package version from 1.5.4 to 1.5.5 in packages/ui-components/package.json

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
packages/ui-components/src/Containers/MetaBar/index.tsx Changed wrapper element from <div> to <aside> with aria-label="Article metadata" to provide semantic landmark
packages/ui-components/src/Common/Banner/index.tsx Changed wrapper from <div> to <section> with role="region" and aria-label="Announcement"
packages/ui-components/package.json Version bump from 1.5.4 to 1.5.5

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@avivkeller avivkeller left a comment

Choose a reason for hiding this comment

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

(Blocking, as this can't land with the hardcoded values)

<div className={`${styles.banner} ${styles[type] || styles.default}`}>
<section
className={`${styles.banner} ${styles[type] || styles.default}`}
aria-label="Announcement"
Copy link
Member

Choose a reason for hiding this comment

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

Instead, and this should apply to the Banner changes as well, this component should accept ...props, and forward those props to the aside. We try not to hard code values for translations

Copy link
Contributor Author

Choose a reason for hiding this comment

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

addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants