Closed ADTC closed 1 month ago
As of now, I'm manually overriding the role='button'
attribute on each of the buttons. It loses the ARIA benefits, sure, but it gets the job done.
Worst part though is, I have to do a useEffect
in React to do this, because directly applying to the component doesn't stick. (I suppose if you're using regular HTML, you may not have to worry about this.)
useEffect(() => {
// Directly setting the attribute doesn't work, because
// it gets overwritten by the media-chrome library.
playButtonRef.current?.setAttribute('role', 'generic')
muteButtonRef.current?.setAttribute('role', 'generic')
})
In my globals file, there are CSS variables defined in
:root
as follows:These are getting picked up by Media Chrome and applied to the buttons. I can't find an effective way to avoid this.