#54168 closed enhancement (fixed)
Switch upload media from button to file input
Reported by: | joedolson | Owned by: | joedolson |
---|---|---|---|
Milestone: | 5.9 | Priority: | normal |
Severity: | normal | Version: | 3.3 |
Component: | Media | Keywords: | has-patch needs-testing |
Focuses: | accessibility, javascript | Cc: |
Description (last modified by )
Per @justinahinon (see Slack discussion), the media library needs to use input type="file"
in order to run e2e tests with Puppeteer (#52895).
Based on some quick testing, this should work pretty smoothly.
Attachments (3)
Change History (27)
This ticket was mentioned in Slack in #accessibility by alexstine. View the logs.
3 years ago
#4
@
3 years ago
The button
class works fine on my side on the label element, this patch looks good to go on my side 👍
#5
@
3 years ago
With the hidden
class (using display: none
), I cannot tab to the file input as I could with the button input.
The screen-reader-text
class might help with tabbing, but the button-styled label should acknowledge the focus state (perhaps by adding .drag-drop-inside p.drag-drop-buttons:focus-within label.button
to buttons.css).
This ticket was mentioned in Slack in #core-media by antpb. View the logs.
3 years ago
This ticket was mentioned in Slack in #accessibility by ryokuhi. View the logs.
3 years ago
#9
@
3 years ago
- Keywords commit added; needs-testing removed
Using the keyboard or the mouse, that patch worked for me in Chrome, Firefox and Edge (Windows).
#10
@
3 years ago
This also needs to be applied to the media library uploader ('Add New' from inside the media library).
Will get a patch together as soon as possible, but that's proving to be considerably trickier than the version outside the library.
This ticket was mentioned in Slack in #core-media by antpb. View the logs.
3 years ago
This ticket was mentioned in Slack in #core-media by joedolson. View the logs.
3 years ago
This ticket was mentioned in Slack in #accessibility by ryokuhi. View the logs.
3 years ago
This ticket was mentioned in Slack in #core-media by joedolson. View the logs.
3 years ago
This ticket was mentioned in PR #1835 on WordPress/wordpress-develop by antpb.
3 years ago
#18
Trac ticket:
https://core.trac.wordpress.org/ticket/54168
This ticket was mentioned in Slack in #core-media by hellofromtonya. View the logs.
3 years ago
hellofromtonya commented on PR #1835:
3 years ago
#24
Committed via https://core.trac.wordpress.org/changeset/52059.
Switches input from button to file; adds styles to hide input & show label as button style.