h5p / h5p-audio

10 stars 44 forks source link

Add functions to enable/disable audio button #19

Closed otacke closed 5 years ago

otacke commented 5 years ago

Some content types may require to disable/enable the audio button conditionally. This pull request will add the required functionality.

Disabling is not done using the disabled property as it implicitly sets tabindex to -1 and seems to confuse ChromeVox navigation when the button that's disabled is in focus.

otacke commented 5 years ago

@fnoks I changed the issues. And no, I've had a look at the full player, and I could probably create some trickery with additional listeners to prevent play/pause, but I am not sure that there's a way to visually indicate that the button is disabled on all browsers using the audio element. To do this, I assume that custom controls are necessary.

fnoks commented 5 years ago

Thank you for your contribution, @otacke :1st_place_medal:

otacke commented 5 years ago

@fnoks You're more then welcome! When is release day? I need to prepare a new box of candy ... :-D

fnoks commented 5 years ago

Hehe, I haven't set a release date. But the box of candy will definitively make it get a higher priority :chocolate_bar: