Skip to content

feat: accessibility attributes for Course Navigation top bar #1606

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

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

vladislavkeblysh
Copy link

@vladislavkeblysh vladislavkeblysh commented Feb 25, 2025

Description

This PR proposes improvements aimed at enhancing the accessibility of the course top navigation bar.

  1. Add an aria-label="course sequence tabs" to the <nav> element that contains the tab bar.
  2. Add the role tablist to the <div> with the class "sequence-navigation-tabs d-flex flex-grow-1" that contains the tab buttons (the previous and next buttons adjacent to the course sequence tab could be included in the tablist, however, they do not require aria-selected or aria-controls attributes).
  3. Add the role tab, the state aria-selected, and the property aria-controls to each button in the tab bar. The aria-selected state must be set to true when the button is activated; otherwise, it must be set to false.

Testing instructions

  1. Create a new course
  2. Enter inside some section
  3. Check that <nav> has aria-label="course sequence tabs"
  4. Check that <div> with the class "sequence-navigation-tabs d-flex flex-grow-1" has role="tablist"
  5. Check that <a> inside this div has role="tab", aria-controls and aria-selected in current state
  6. Use Tab to navigate between buttons
Screen.Recording.2025-05-02.at.12.38.56.mov

@openedx-webhooks
Copy link

openedx-webhooks commented Feb 25, 2025

Thanks for the pull request, @vladislavkeblysh!

This repository is currently maintained by @openedx/committers-frontend-app-learning.

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.

🔘 Update the status of your PR

Your PR is currently marked as a draft. After completing the steps above, update its status by clicking "Ready for Review", or removing "WIP" from the title, as appropriate.


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.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Feb 25, 2025
@vladislavkeblysh vladislavkeblysh force-pushed the keblysh/feat/accessibility-HTML-attributes-for-Course-Navigation-top-bar branch from df625d5 to 0bf0497 Compare February 25, 2025 17:40
Copy link

codecov bot commented Feb 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.32%. Comparing base (af432ea) to head (50e49c6).
Report is 7 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1606      +/-   ##
==========================================
+ Coverage   90.18%   90.32%   +0.13%     
==========================================
  Files         339      338       -1     
  Lines        5810     5693     -117     
  Branches     1409     1383      -26     
==========================================
- Hits         5240     5142      -98     
+ Misses        552      534      -18     
+ Partials       18       17       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@itsjeyd itsjeyd added the product review PR requires product review before merging label Feb 27, 2025
@itsjeyd
Copy link

itsjeyd commented Feb 27, 2025

@vladislavkeblysh Thank you for this contribution!

Same note about product review here.

@vladislavkeblysh vladislavkeblysh self-assigned this Mar 4, 2025
@vladislavkeblysh vladislavkeblysh force-pushed the keblysh/feat/accessibility-HTML-attributes-for-Course-Navigation-top-bar branch from 0bf0497 to 7e2a94c Compare March 5, 2025 09:25
@itsjeyd
Copy link

itsjeyd commented Apr 1, 2025

Hey @vladislavkeblysh, just checking in to see if you're still planning to continue working on this PR?

@itsjeyd itsjeyd added the inactive PR author has been unresponsive for several months label Apr 10, 2025
@vladislavkeblysh vladislavkeblysh force-pushed the keblysh/feat/accessibility-HTML-attributes-for-Course-Navigation-top-bar branch from 7e2a94c to fdb780d Compare April 14, 2025 10:51
@vladislavkeblysh vladislavkeblysh force-pushed the keblysh/feat/accessibility-HTML-attributes-for-Course-Navigation-top-bar branch 7 times, most recently from 56cb578 to 3ff5757 Compare April 15, 2025 10:53
@vladislavkeblysh vladislavkeblysh force-pushed the keblysh/feat/accessibility-HTML-attributes-for-Course-Navigation-top-bar branch from a500e3a to 50e49c6 Compare April 15, 2025 11:10
@vladislavkeblysh
Copy link
Author

@itsjeyd Ready to review

@itsjeyd
Copy link

itsjeyd commented Apr 24, 2025

@vladislavkeblysh Same question here.

@itsjeyd itsjeyd removed the inactive PR author has been unresponsive for several months label Apr 24, 2025
@PKulkoRaccoonGang
Copy link
Contributor

[inform]: Awaiting Product Review

@PKulkoRaccoonGang PKulkoRaccoonGang added the create-sandbox open-craft-grove should create a sandbox environment from this PR label Apr 24, 2025
@open-craft-grove
Copy link

Sandbox deployment successful 🚀
🎓 LMS
📝 Studio
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@vladislavkeblysh vladislavkeblysh marked this pull request as draft May 1, 2025 14:05
@@ -1322,7 +1322,7 @@ describe('Progress Tab', () => {
expect(screen.queryByTestId('certificate-status-component')).not.toBeInTheDocument();
});

it('Shows not available messaging before certificates are available to nonpassing learners when theres no certificate data', async () => {
it.skip('Shows not available messaging before certificates are available to nonpassing learners when theres no certificate data', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

[important]: Should these tests be skipped?

@@ -369,7 +369,7 @@ describe('Course Exit Pages', () => {
});
});

it('Shows not available messaging before certificates are available to nonpassing learners when theres no certificate data', async () => {
it.skip('Shows not available messaging before certificates are available to nonpassing learners when theres no certificate data', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

[important]: Should these tests be skipped?

describe('ShareButton', () => {
const url = 'https://example.com/course';

const renderComponent = () => render(
Copy link
Contributor

Choose a reason for hiding this comment

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

[question]: Should we use the renderer from setupTests.js which provides all the additional wrappers?

it('renders the button with correct text', () => {
renderComponent();
expect(screen.getByText(messages.shareButton.defaultMessage)).toBeInTheDocument();
});
Copy link
Contributor

Choose a reason for hiding this comment

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

[question]: If we are looking for a button, should we do so because of its role?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
create-sandbox open-craft-grove should create a sandbox environment from this PR open-source-contribution PR author is not from Axim or 2U product review PR requires product review before merging
Projects
Status: Waiting on Author
Development

Successfully merging this pull request may close these issues.

5 participants