Opened 4 years ago
Closed 4 years ago
#50281 closed defect (bug) (fixed)
It should be possible to select the heading text for site health check issues
Reported by: | johnbillion | Owned by: | audrasjb |
---|---|---|---|
Milestone: | 5.5 | Priority: | normal |
Severity: | normal | Version: | 5.2 |
Component: | Site Health | Keywords: | has-patch has-screenshots commit |
Focuses: | accessibility | Cc: |
Description
After checking the Tools -> Site Health screen and seeing some critical issues, my first instinct was to copy one of the error messages into a search engine to see what the resolution might be.
Unfortunately it's not possible to select the text in the heading of the expanding panels on this screen to do that. This appears to be because the toggles are <button>
elements.
It should be possible to select the heading text so users can quickly look up information relating to the errors, particularly for issues that themselves don't provider further information or links.
Attachments (3)
Change History (16)
This ticket was mentioned in Slack in #accessibility by afercia. View the logs.
4 years ago
#3
@
4 years ago
- Keywords reporter-feedback removed
Unfortunately I don't have any suggestion for a better implementation -- my understanding is that a <button>
is the most appropriate and accessible element to use for an expand/contract toggle control -- but it is confusing for the user to not be able to select this heading text when it's styled to look like a heading instead of a button.
Are there ways to make the text inside a button user selectable?
#4
@
4 years ago
Are there ways to make the text inside a button user selectable?
Hm to start, we should make sure to address inconsistencies across browsers. For example, Firefox uses user-select: none;
for buttons in its default stylesheet. We should set it to user-select: auto;
explicitly in a quick patch.
Selecting the text is possible, in a way, but it's not that easy or intuitive. The mouse selection needs to start from outside the buttons. See attached aniamted GIF.
We could try to add some padding to the headings, to make the selection start easier but that would also reduce the clickable area.
I can't think of other ways off the top of my head. One option could be making the whole check text selectable by adding a "Copy" button like in the "Info" page at site-health.php?tab=debug
.
#5
@
4 years ago
Adding user-select: auto
:
- It is easier to select the button text in Firefox (Windows). It's also easier to select only part of the full text.
- I did not notice any difference for Chrome (Windows), Edge or IE, even with the vendor prefixes.
I had also tried user-select: text
, but I see no difference between that and auto
.
The selection of vendor prefixes matches what was used in common.css (for user-select: none
).
This ticket was mentioned in Slack in #accessibility by afercia. View the logs.
4 years ago
#7
@
4 years ago
- Keywords needs-patch added
- Milestone changed from Awaiting Review to 5.5
Milestoning for 5.5. The first, simple, improvement with user-select: auto
can be easily fixed in time for the release.
This ticket was mentioned in Slack in #core-site-health by afragen. View the logs.
4 years ago
#10
@
4 years ago
I also floated towards a copy-button like solution, but that feels more natural for the whole issue, and not just a part of it, so you'd not be solving the immediate purpose of this ticket of getting the title for a quick trip to your favorite search engine.
It makes sense to at least get 50281.patch in, to allow for selecting from outside the button in all browsers at the very least, but besides that..
Maybe if we added one of those "copy" icons next to the title on hover, that only copies the title when clicked, sort of like Github lets you copy tokens?
@johnbillion thanks!
The various check “titles” in the Site Health pages are headings that contain buttons. Their text is plain text and the selection mechanism is not different from the standard behavior of native
<button>
elements. I’m not sure there’s anything to “fix”.Actually, it is possible to select with mouse by starting the selection from outside the edges of the "titles". After all, the same thing happens for normal
<button>
elements: you need to start the selection from outside the button.Any suggestions fpr a better behavior?