Skip to content

Conversation

@filippovskii09
Copy link

@filippovskii09 filippovskii09 commented Oct 23, 2025

Description

This PR provides a mechanism to close the tooltip using the keyboard. The escape key is recommended

Testing instructions

  1. Create new course
  2. Go to Progress page
  3. Place focus on tooltip content when the tooltip button is activated.
  4. Close tooltip with Escape key
  5. Ensure focus is trapped within the tooltip until it is close.
2025-10-23.16.57.37.mov

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Oct 23, 2025
@openedx-webhooks
Copy link

Thanks for the pull request, @filippovskii09!

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.

@codecov
Copy link

codecov bot commented Oct 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.84%. Comparing base (f91af21) to head (4e6bbcd).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1812      +/-   ##
==========================================
- Coverage   90.84%   90.84%   -0.01%     
==========================================
  Files         345      345              
  Lines        5800     5797       -3     
  Branches     1376     1381       +5     
==========================================
- Hits         5269     5266       -3     
  Misses        514      514              
  Partials       17       17              

☔ 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.

@@ -0,0 +1,77 @@
import React from 'react';
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need this import?

Copy link
Author

Choose a reason for hiding this comment

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

removed

@@ -0,0 +1,77 @@
import React from 'react';
import { render } from '@testing-library/react';
Copy link
Contributor

Choose a reason for hiding this comment

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

[question]: Is it possible to use function render from file setupTests https://github.com/openedx/frontend-app-learning/blob/master/src/setupTest.js#L222 in these tests?

Copy link
Author

Choose a reason for hiding this comment

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

yes, fixed, i used render from setupTest

@@ -1,3 +1,4 @@
import React, { useState } from 'react';
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need this React import?

Copy link
Author

Choose a reason for hiding this comment

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

no, removed

@@ -0,0 +1,127 @@
import React from 'react';
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need this import?

Copy link
Author

Choose a reason for hiding this comment

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

no, removed

@@ -0,0 +1,127 @@
import React from 'react';
import { render, screen, waitFor } from '@testing-library/react';
Copy link
Contributor

Choose a reason for hiding this comment

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

[question]: Is it possible to use function render from file setupTests https://github.com/openedx/frontend-app-learning/blob/master/src/setupTest.js#L222 in these tests?

Copy link
Author

Choose a reason for hiding this comment

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

yes, fixed, i used render from setupTest

Comment on lines 5 to 8
import { IntlProvider } from 'react-intl';

import { fireEvent } from '@testing-library/dom';
import GradeSummaryHeader from './GradeSummaryHeader';
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
import { IntlProvider } from 'react-intl';
import { fireEvent } from '@testing-library/dom';
import GradeSummaryHeader from './GradeSummaryHeader';
import { IntlProvider } from 'react-intl';
import { fireEvent } from '@testing-library/dom';
import GradeSummaryHeader from './GradeSummaryHeader';

Copy link
Author

Choose a reason for hiding this comment

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

fixed

name: messages.gradeSummaryTooltipAlt.defaultMessage,
});

fireEvent.click(iconButton);
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Author

Choose a reason for hiding this comment

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

fixed

expect(screen.getByText(messages.gradeSummaryTooltipBody.defaultMessage)).toBeVisible();
});

fireEvent.click(iconButton);
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Author

Choose a reason for hiding this comment

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

fixed

expect(screen.getByText(messages.gradeSummaryTooltipBody.defaultMessage)).toBeInTheDocument();
});

fireEvent.keyDown(iconButton, { key: 'Escape', code: 'Escape' });
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Author

Choose a reason for hiding this comment

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

fixed

useSelector: jest.fn(),
}));

describe('LiveTab', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you explain why we are adding these tests to this PR?
It looks like we are proposing accessibility improvements in this PR, but we are writing tests for the functionality of the LiveTab component.

Copy link
Author

@filippovskii09 filippovskii09 Oct 24, 2025

Choose a reason for hiding this comment

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

These tests were cherry-picked along with the related changes from a previously closed PR.
The tests themselves are not directly related to the accessibility improvements.
I can separate them if needed, but for now, they ensure we don’t lose existing coverage.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, but these tests seem to test functionality that is not relevant to this PR. Will we have coverage issues if we remove them?

Copy link
Author

Choose a reason for hiding this comment

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

deleted test and no problem occurred

import GradeSummaryHeader from './GradeSummaryHeader';
import { useModel } from '../../../../generic/model-store';
import messages from '../messages';
import { initializeMockApp, render } from '../../../../setupTest';
Copy link
Contributor

Choose a reason for hiding this comment

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

[nit]: Please use @src alias

Copy link
Author

Choose a reason for hiding this comment

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

fixed

Comment on lines 48 to 49
onClick={() => { setShowTooltip(!showTooltip); }}
onBlur={() => { setShowTooltip(false); }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
onClick={() => { setShowTooltip(!showTooltip); }}
onBlur={() => { setShowTooltip(false); }}
onClick={() => setShowTooltip(!showTooltip)}
onBlur={() => setShowTooltip(false)}

Copy link
Author

Choose a reason for hiding this comment

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

fixed

@@ -0,0 +1,126 @@
import { screen, waitFor } from '@testing-library/react';
Copy link
Contributor

Choose a reason for hiding this comment

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

try to import from setupTest.js

Copy link
Author

Choose a reason for hiding this comment

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

fixed

@itsjeyd itsjeyd moved this from Needs Triage to Waiting on Author in Contributions Oct 28, 2025
@itsjeyd
Copy link

itsjeyd commented Oct 28, 2025

Hi @filippovskii09, thank you for this contribution! Since it's a user-facing change, it will need product approval before it can be merged.

Please choose your product contribution type and follow the corresponding instructions to get the product review process started.

@itsjeyd itsjeyd added the product review PR requires product review before merging label Oct 28, 2025
@PKulkoRaccoonGang
Copy link
Contributor

@itsjeyd thanks! I plan to create a product proposal and add all of our PRs related to accessibility improvements to it. For now, the PRs will be in draft and awaiting product review

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

Labels

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