premieroctet / react-native-video-controls

Controls elements and utilities for react-native video players (react-native-video, expo-av, etc.).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature Request] : add a11y support in <ControlsVisibilityProvider /> for screen reader

quentingrchr opened this issue · comments

Issue:

Currently, the <ControlsVisibilityProvider /> has a visibility feature that is triggered either by the autoHideAfterDuration timer or by a tap (toggle) on the video. This doesn't work well with accessibility (a11y), as all the buttons cannot be read when the controls are not visible.

Solution:

  • We could add an "alwaysVisible" prop/parameter to override the "visible" prop of the <ControlsVisibilityProvider /> component.

  • We could incorporate a built-in screen reader detection feature into this library that would manage the visibility of the controls, ensuring that users with screen readers can use the player.

Additionally, some prop types, such as those in <ControlSlider/>, could be enhanced to accept a11y props like "accessibilityState," "accessibilityRole," or "accessibilityLabel."