Commit e0eb90b
committed
Media: A11y: Switch uploader toggle to
The control to switch between the browser uploader and the default uploader used a link with `target="_blank"`, but was driven by scripts. In a no-js context, this meant that the link could be used to open the browser uploader in a new tab. This is unnecessary, however, because the default uploader is not rendered when JS is not available.
On switching uploaders, browser focus was lost.
For more predictable keyboard and screen reader behavior, switch the media uploader toggle to a `button` element and set focus to the upload button in the new context.
Props dilipbheda, sabernhardt, rollybueno, westonruter, joedolson.
Fixes #63238.
git-svn-id: https://develop.svn.wordpress.org/trunk@61099 602fd350-edb4-49c9-b593-d223f7449a82button and set focus.1 parent d5fed6b commit e0eb90b
File tree
2 files changed
+15
-18
lines changed- src
- js/_enqueues/vendor/plupload
- wp-admin/includes
2 files changed
+15
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
| 279 | + | |
| 280 | + | |
279 | 281 | | |
280 | 282 | | |
281 | 283 | | |
| 284 | + | |
282 | 285 | | |
283 | 286 | | |
284 | 287 | | |
| |||
420 | 423 | | |
421 | 424 | | |
422 | 425 | | |
423 | | - | |
| 426 | + | |
424 | 427 | | |
425 | 428 | | |
426 | 429 | | |
427 | | - | |
| 430 | + | |
428 | 431 | | |
429 | 432 | | |
430 | 433 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3028 | 3028 | | |
3029 | 3029 | | |
3030 | 3030 | | |
3031 | | - | |
3032 | | - | |
3033 | 3031 | | |
3034 | 3032 | | |
3035 | | - | |
3036 | | - | |
3037 | | - | |
3038 | | - | |
3039 | | - | |
3040 | | - | |
3041 | | - | |
3042 | | - | |
3043 | | - | |
3044 | 3033 | | |
3045 | 3034 | | |
3046 | 3035 | | |
3047 | 3036 | | |
3048 | | - | |
3049 | | - | |
3050 | | - | |
3051 | | - | |
| 3037 | + | |
| 3038 | + | |
| 3039 | + | |
3052 | 3040 | | |
3053 | 3041 | | |
3054 | 3042 | | |
| |||
3063 | 3051 | | |
3064 | 3052 | | |
3065 | 3053 | | |
3066 | | - | |
| 3054 | + | |
| 3055 | + | |
| 3056 | + | |
| 3057 | + | |
| 3058 | + | |
| 3059 | + | |
| 3060 | + | |
3067 | 3061 | | |
3068 | 3062 | | |
3069 | 3063 | | |
| |||
0 commit comments