#37594 closed defect (bug) (fixed)
Quick Draft dashboard widget toggle button contains escaped HTML
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.6 | Priority: | normal |
Severity: | normal | Version: | 4.6 |
Component: | Administration | Keywords: | has-screenshots has-patch commit dev-reviewed |
Focuses: | Cc: |
Description
Introduced in [37972]
The Quick Draft dashboard widget title contains some HTML, a couple of <span>
elements to show a different title depending on JavaScript is on or off. In fact, when JS is off, the widget hides the "quick press" form, shows the current user recent drafts and the title becomes "Drafts".
The same title string is used also for the "toggle" arrow and, as far as I see, in WordPress 4.5 is not escaped but it is on trunk. The result is an escaped HTML string in the button screen-reader-text
:
Screen readers will read out the text as "less then span class..." etc.
Also, please notice the same string is not escaped when used for the widget <h2>
heading and for the checkbox label in the Screen Options.
Maybe the best option would be refactoring the HTML in order to have 2 separated strings, but WordPress 4.6 is now Release Candidate so it's strings freeze time. The only other solution I can think of is removing the escaping ...
Attachments (1)
Change History (8)
#2
@
9 years ago
- Keywords has-patch commit added; needs-patch removed
With 37594.patch screen readers will read "Toggle Panel: Quick Draft, expanded, button".
Aside: when JS is off, instead of "Drafts", maybe a better title would be "Your Recent Drafts" since it is actually displaying just the current user's drafts.