Skip to content
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

Fix channel tabs accessibility #3689

Merged

Conversation

absidue
Copy link
Member

@absidue absidue commented Jun 20, 2023

Fix channel tabs accessibility

Pull Request Type

  • Bugfix

Related issue

closes #3643

Description

This pull request fixes the channel tabs not behaving as expected when navigating them with the keyboard. This should bring it inline with https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/tab_role#keyboard_interaction.

Issues that are fixed:

  1. Some unselected tabs were navigatable with the TAB key
  2. Opening a channel link with a tab in it, wouldn't set the aria-selected and tabindex properties

Screenshots

see video in #3643 for a before view

Testing

tip: click on the share button twice (open and close) to set the focus on it, so that you don't have to TAB through the whole window to get to the channel tabs.

First test case

Check that only the currently selected tab can be visited by pressing the TAB key (you can select different tabs by using the arrow keys to change the focus and SPACE or ENTER to select a tab)

Second test case

  1. Open https://www.youtube.com/@LinusTechTips/about
  2. Check that the about tab is selected by default and that only it can be navigated to with the TAB key

Third test case

  1. Focus the the channel search bar (e.g. by clicking on it)
  2. Check that SHIFT+TAB sets the focus to the videos tab

Desktop

  • OS: Windows
  • OS Version: 10
  • FreeTube version: 3c6e1d1

@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Jun 20, 2023
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) June 20, 2023 17:21
@PikachuEXE
Copy link
Collaborator

tip: click on the share button twice (open and close) to set the focus on it, so that you don't have to TAB through the whole window to get to the channel tabs.

I normally just use mouse to click near it and then tab

Copy link
Collaborator

@PikachuEXE PikachuEXE left a comment

Choose a reason for hiding this comment

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

All tested

@efb4f5ff-1298-471a-8973-3d47447115dc
Copy link
Member

efb4f5ff-1298-471a-8973-3d47447115dc commented Jun 26, 2023

Focus the the channel search bar (e.g. by clicking on it)
Check that SHIFT+TAB sets the focus to the videos tab

This goes in reverse direction for me, am i doing something wrong?

VirtualBoxVM_lsAjMNc04k.mp4

@ChunkyProgrammer
Copy link
Member

This goes in reverse direction for me, am i doing something wrong?

Shift + Tab is supposed to go in reverse. Tab is supposed to go forward. Once you get to the Videos tab, the arrow keys should allow you to switch to shorts/live/community/ etc.

@efb4f5ff-1298-471a-8973-3d47447115dc

Ah it says Video tab somehow i read Video page

@FreeTubeBot FreeTubeBot merged commit 0a471f8 into FreeTubeApp:development Jun 26, 2023
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Jun 26, 2023
@absidue absidue deleted the fix-channel-tabs-accessibility branch June 26, 2023 19:38
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.

[Bug]: Accessibility issue on channel page tabs
5 participants