-
Notifications
You must be signed in to change notification settings - Fork 15
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(ADA-1745) - Create alternative aria-label for close button #984
base: master
Are you sure you want to change the base?
fix(ADA-1745) - Create alternative aria-label for close button #984
Conversation
src/components/overlay/overlay.tsx
Outdated
@@ -155,7 +155,10 @@ class Overlay extends Component<OverlayProps, any> { | |||
props.onClose(); | |||
}} | |||
onKeyDown={this.onCloseButtonKeyDown} | |||
aria-label={(<Text id="overlay.close" />) as unknown as string} | |||
aria-label={ | |||
props.closeAriaLabel || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where is this value being set ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
closeAriaLabel is an optional prop that is set when needed. For now I am setting it in Video Info and Downloads.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would recommend use (<Text id="overlay.close" />) as unknown as string
as default property of closeAriaLabel
. Then you can use aria-label={props.closeAriaLabel}
src/components/overlay/overlay.tsx
Outdated
@@ -155,7 +155,10 @@ class Overlay extends Component<OverlayProps, any> { | |||
props.onClose(); | |||
}} | |||
onKeyDown={this.onCloseButtonKeyDown} | |||
aria-label={(<Text id="overlay.close" />) as unknown as string} | |||
aria-label={ | |||
props.closeAriaLabel || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would recommend use (<Text id="overlay.close" />) as unknown as string
as default property of closeAriaLabel
. Then you can use aria-label={props.closeAriaLabel}
This solves https://kaltura.atlassian.net/browse/ADA-1745
Related to kaltura/playkit-js-info#112 and kaltura/playkit-js-downloads#84
Description of the Changes
Please add a detailed description of the change, whether it's an enhancement or a bugfix.
If the PR is related to an open issue please link to it.
Issue:
Fix:
Resolves FEC-[Please add the ticket reference here]