Skip to content

fix: validation added to fix a11y issue - #39125

Open
jesusbalderramawgu wants to merge 2 commits into
openedx:masterfrom
WGU-Open-edX:skip-link-main-content
Open

jesusbalderramawgu wants to merge 2 commits into
openedx:masterfrom
WGU-Open-edX:skip-link-main-content

Conversation

@jesusbalderramawgu

Copy link
Copy Markdown
Contributor

Description

PR to fix an a11y issue, it closes this issue.

Issue

In summary we have currently two Skip links and we should have only one "globally"

Fix

Ensure the skip link targets the main content container using a valid anchor or focusable element at the start of the primary content region.

Testing instructions

Given you open a unit in the learning MFE at http:///learning/course/<course_id>/<sequence_id>/<unit_id>
When you press Tab from the address bar
Then

The first focusable element is the top-level "Skip to main content" link (from the MFE header).
Subsequent Tab presses go through the MFE header links and directly into the first control inside the unit iframe.
No second "Skip to main content" link appears between the header and the unit content.
DOM check: In DevTools, inspect iframe.unit-iframe > body. There must be no element.

Screenshots

Before the fix

Screenshot 2026-09-17 at 2 53 46 p m

After the fix

Screenshot 2026-09-17 at 2 54 02 p m

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Sep 17, 2026
@openedx-webhooks

Copy link
Copy Markdown

Thanks for the pull request, @jesusbalderramawgu!

This repository is currently maintained by @openedx/wg-maintenance-openedx-platform-oncall.

Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review.

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

Details
Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The change is small, localized, and consistent with the stated a11y goal, with only a minor maintainability nit noted.

Pull request overview

This PR adjusts LMS base template rendering to prevent an extra “Skip to main content” link from appearing in chromeless/iframe contexts (notably the Learning MFE unit iframe), aligning with the accessibility goal of having a single global skip link.

Changes:

  • Conditionally renders the LMS skip link only when the LMS header is enabled.
  • Prevents the skip link from appearing on pages rendered with disable_header (commonly used for embedded/chromeless views).
File summaries
File Description
lms/templates/main.html Wraps the LMS skip-link output in a not disable_header condition to avoid duplicate skip links in chromeless/iframe contexts.
Review details

Suppressed comments (1)

lms/templates/main.html:210

  • This introduces a second separate if not disable_header block; the skip link can be placed inside the existing header guard to avoid duplicated conditionals and keep related header/chrome elements grouped together.
    % if not disable_header:
    <a class="nav-skip sr-only sr-only-focusable" href="#main">${_("Skip to main content")}</a>
    % endif

    % if not disable_header:
        <%include file="${static.get_template_path('header.html')}" args="online_help_token=online_help_token" />
        <%include file="/preview_menu.html" />
    % endif
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@mphilbrick211 mphilbrick211 added the mao-onboarding Reviewing this will help onboard devs from an Axim mission-aligned organization (MAO). label Sep 17, 2026
@mphilbrick211 mphilbrick211 moved this from Needs Triage to Waiting on Author in Contributions Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mao-onboarding Reviewing this will help onboard devs from an Axim mission-aligned organization (MAO). open-source-contribution PR author is not from Axim or 2U

Projects

Status: Waiting on Author

Development

Successfully merging this pull request may close these issues.

4 participants