[wp-trac] [WordPress Trac] #57503: Why does mejs audio player have tabindex="0" on the container div?

WordPress Trac noreply at wordpress.org
Fri Jan 20 16:25:51 UTC 2023


#57503: Why does mejs audio player have tabindex="0" on the container div?
--------------------------+------------------------------
 Reporter:  squarecandy   |       Owner:  joedolson
     Type:  defect (bug)  |      Status:  accepted
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Media         |     Version:  6.1.1
 Severity:  minor         |  Resolution:
 Keywords:                |     Focuses:  accessibility
--------------------------+------------------------------

Comment (by squarecandy):

 This does seem to be originating from the mediaelement library, and not
 from the WP templating/implementation.

 https://github.com/WordPress/wordpress-
 develop/blob/0cb8475c0d07d23893b1d73d755eda5f12024585/src/js/_enqueues/vendor/mediaelement
 /mediaelement-and-player.js#L3745

 The main accessibility problem with this, is that the library also hides
 the focus with:

 {{{
 .mejs-container:focus {
     outline: none
 }
 }}}

 https://github.com/WordPress/wordpress-
 develop/blob/0cb8475c0d07d23893b1d73d755eda5f12024585/src/js/_enqueues/vendor/mediaelement
 /mediaelementplayer-legacy.css#L53

 I guess this probably won't get much attention if the library is now
 labeled "legacy" but we use this all over our projects and would love to
 not have to upgrade.

 We can override these things in our own implementations, but I thought it
 would be good to point it out to the accessibility team.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57503#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list