#31722 closed defect (bug) (fixed)
Shiny Updates: the aria-label should be updated to reflect the current status
Reported by: | afercia | Owned by: | afercia |
---|---|---|---|
Milestone: | 4.2 | Priority: | normal |
Severity: | major | Version: | 4.2 |
Component: | Upgrade/Install | Keywords: | has-patch, 4.2-strings |
Focuses: | ui, accessibility | Cc: |
Description
Please refer to attached screenshots. Not sure this is the only place to check, basically all the aria information should be updated together with the "visual" information to always reflect the current upgrade/install status.
In this example, where it still says "Update xx plugin now" or "Install xx plugin now", the value should be updated at least with the final result "Updated" or "Installed". Worth checking also what happens in case of failures.
Attachments (4)
Change History (21)
#3
@
10 years ago
Hi @mehulkaklotar, thanks very much for your patch. You made a good point about the plugin name. I'd say to keep it simple and have in the aria-label the same message displayed to users, without the plugin name.
After all, users already know the name of the plugin they're updating because they've just pressed the button, for example their screen reader just read out:
"Update RTL Tester 1.0.5 now"
A couple of things:
- patch should be refreshed after r31897 that removed the installs part
- more importantly, the button with aria-label is used only in the "plugin-install.php" page so the patch should do nothing when updating from "plugins.php"
This ticket was mentioned in Slack in #core by drew. View the logs.
10 years ago
#5
@
10 years ago
- Keywords has-patch added; needs-patch removed
- Owner set to afercia
- Priority changed from normal to high
- Severity changed from normal to major
- Status changed from new to assigned
Since this related to the accessibility of new functionality, we really need to come up with a good solution here sooner than later. @afercia: If you don't mind, I'm going to assign this ticket to you.
#7
@
10 years ago
Following @mehulkaklotar approach, I would propose just a couple of tweaks, see previous comment 3. Results in the screenshot below. Proposed patch:
- update the "Update" button aria-label attribute to reflect the current update status
- do that just where there's a button, in the 'plugin-install' screen
#8
@
10 years ago
@afercia, can we extract the plugin names with some jQuery Code and then do some tweaks about the name appearing in the aria-label
?
#9
@
10 years ago
@mehulkaklotar hi, I agree it would be nice to have the plugin name added to the messages, but I see two issues there:
- translation issues: for example "Updating {pluginname}" and "{pluginname} updated!" not sure how to handle that in different languages
- the {pluginname} should be returned by the API response instead of trying to get it with some jQuery which is maybe a bit unreliable
maybe worth it to create a new ticket to propose the API to return the plugin name?
#10
@
10 years ago
Hello @afercia,
Yes. We can have a data-title
attribute to the each plugin anchor links and then take that as input for updating the message in aria-label
.
#11
follow-up:
↓ 12
@
10 years ago
Hello @mehulkaklotar
you're right, thanks very much :) we need some new strings and a placeholder to allow translators to shift the plugin name if needed. Agreed with @ocean90 to introduce a few new strings. To summarize:
New patch by @mehulkaklotar uses data attribute to pass the plugin name to JavaScript.
In the refreshed proposed patch:
- since this is the plugin name, I'd propose to change "title" and "plugin_title" in "name"
- new strings for translation, use a placeholder
- tweaking existing strings (e.g. removed dot from 'Update Failed.', casing)
- updates.js: removed some mixed space/tabs or double spaces
- updates.js: moved 1 var declaration at the top
- updates.js: jshinted
#12
in reply to:
↑ 11
@
10 years ago
Replying to afercia:
- new strings for translation, use a placeholder
Please add a translator comment to each new string, which explains what the placeholder is used for: /* translator comment: %: plugin name */
.
Here we have a 1 problem here while updating the
aria-label
for a particular plugin. Because the aria-label has a plugin name in it. So will it be the the same message as the message showed to user without the plugin name in it? Attaching same changes here. But need more clarification over plugin name thing.