-
-
Notifications
You must be signed in to change notification settings - Fork 661
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A11y Addons control panel #6345
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for plone-components canceled.
|
padding: 2rem 1.5rem; | ||
} | ||
|
||
#page-addons .btn-primary { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not a fan of this styling of button variants where we introduce css overrides.
Since we are starting over and making use of css vars we should have a button class
and variant classes that where possible just modifies the vars.
Have a look at this article where this designer shows how they made their button
component.
https://piccalil.li/blog/how-i-build-a-button-component/#variants
I feel like we still need to adopt a styling methodology and try to use it in the new
components if we are now at the totally breaking future phase.
Will have another look at the plone.contents efforts and plone.components and
come back with further observations for the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ichim-david it's out of the scope of this PR to go in the direction of the new theming system. Since we don't know how that will be yet, it sounds like a waste of time for me to make it up in this specific PR. Moreover, Victor and I specifically told everybody working on reimplementing these panels and other views to avoid adding plone/components and such because that's not coming in volto 18 while these fixes should be there if possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ichim-david I understand your concerns, and this kind of "custom temporary styling" is not my preferred style either.
I would have gone with a cva/cva like solution (https://cva.style/docs) if we had a theming convention (at least on paper), but alas that's still a long way in the future from what I understand.
As @pnicolli said, we had a talk about this during the sprint, and decided to avoid using plone/components and unified theming like quanta styles.
After some thinking, a possible edge case issue with my initial implementation of selector naming came to mind: people using custom cms-ui styles, like injecting bootstrap or a custom stylesheet with the same selector naming convention. It would have caused inconsistencies and hassles, so I changed the button selector names to reflect the scope of action of that button (install/install upgrade and uninstall).
Update |
@pnicolli @sneridagh I've looked at the bundle implication of loading react-aria-components. |
@ichim-david yeah Victor and I discussed this briefly with the people doing stuff with react-aria-components during Salamina Sprint and we said that we wouldn't use plone/components here because it's still alpha and kind of wip officially, but we can use react-aria-components for now, since moving from this to plone/components should remain easy enough. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see the following a11y issues:
- Verify the warning given by IBM Equal Access Accessibility Checker plugin
- I don't like that the screenreader says just listbox and you can only navigate with the arrows. Here it's strange if you use up and down arrow it will jump to the next listbox heading. If you use left or right keys it will read the heading, the install or uninstall button and the description such as "Installs the collective.volto.stickyblocks add-on." When you think of a listbox you think of up and down only so I don't know how many would think to use left or right to get to the button. Luckily it shows up in the form controls rotary so it could be worse.
- The headings could use a bit of aria-label for instance what is available, if you just navigate through the headings you might not know what available means.
We don't document the tools we use, but we sure ought to. https://6.docs.plone.org/volto/contributing/accessibility-guidelines.html I'll update the open PR with the a11y tools that contributors should use (currently only cypress-axe is included), but please help me out by providing a list of their names (I've started that below), what you use them for, and from where to download or install them. Thank you! |
Sure thing, a couple that come to mind and usually use:
The last resource helped me in coming to a conclusion on the differences between Chrome and Firefox and Safari with VoiceOver we were talking about yesterday. On the brighter side, I did a deep dive in rac docs and internals again, and came up with a solution using a specific prop that under the hood displays the passed value as aria-label (I can now guess why).
The only downside is that dbl click on GridListItem now executes the same action, I cannot do anything about it due to it being a feature of rac. For some power users it could even be a feature, but we can surely think about that more thoroughly. |
@@ -83,7 +112,8 @@ const AvailableItem: React.FC<AvailableAddonProps> = ({ addon, onInstall }) => { | |||
<GridListItem | |||
key={addon['@id']} | |||
className="addon-item" | |||
aria-describedby={`addon-desc-${addon.id}`} | |||
textValue={`${addon.title} ${addon.description}. ${intl.formatMessage({ id: 'Press Enter to install this addon' })}`} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@deodorhunter you add the period which shows up strange if you don't have an addon. See the test result here 416059d#diff-023c7e608404538c6858332e1915002b4c248049367176e7d0a52f69097794a2R65
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get why a test on a slate block widget inside a page should be broken by a period in a controlpanel component aria-label which is not even rendered during said test, but if I remove the period, the test passes...
Oh well, fix incoming.
I saw a coresandbox test breaking randomly too, also on blocks, line 125 of blocks.js, is it cypress hooks and locators/selectors failing or is the test outdated/flaky/wrong?
In cy preview, I'm not seeing anything similar to what the selector is looking for
What is going on here?
I admit my Cypress skills are rusty, I've been using Playwright lately.
@ichim-david Not sure I understand the status today. Are the review comments still open or are they already settled? Are there any blockers among those that are still open? Just trying to figure out if this will make it into v18 or not and how to plan for the future. |
I have a few more comments that I will add soon. This is an improvement over the previous add-ons control panel so I am not against having it for Volto 18. Overall it's just minor issues left that can be handled. @sneridagh should also give his input on this work. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@deodorhunter @pnicolli there is no Upgradable, it's Upgradeable. Please rename everywhere in order for it to sound proper when using a screenreader. This also means every import and file name that has Upgradable.
Also please use add-ons instead of addons as it will be read again better by screen readers
@deodorhunter @pnicolli ok I was incorrect to mention that there is no upgradable, there is https://en.wiktionary.org/wiki/upgradable#English. However I use American english and not british english and it sounded better for me with upgradeable. I don't know if this is reason enough to change it though, @stevepiercy do you have anything to add on this? |
@deodorhunter @pnicolli I would also do the following fixes: |
@deodorhunter I don't like the behavior of double-clicking on the section which will trigger an install or uninstall. it's not at all obvious and is in fact totally unexpected. I might want to copy some of the text from that section and install I get an install or uninstall double-click-to-install-or-uninstall.mp4I see that you mention something about double-clicking performing an action #6345 (comment). EDIT: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my review the changes in volto.pot
are authoritative and should be propagated to the other files.
@@ -0,0 +1 @@ | |||
Updated incomplete types for addons service response. @deodorhunter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated incomplete types for addons service response. @deodorhunter | |
Updated incomplete types for add-on service response. @deodorhunter |
msgid "Available" | ||
msgstr "" | ||
|
||
#. Default: "Available addons" | ||
#: components/manage/Controlpanels/Addons/AddonsControlpanel | ||
msgid "Available addons" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
msgid "Available addons" | |
msgid "Available add-ons" |
msgid "Installed" | ||
msgstr "" | ||
|
||
#. Default: "Installed addons" | ||
#: components/manage/Controlpanels/Addons/AddonsControlpanel | ||
msgid "Installed addons" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
msgid "Installed addons" | |
msgid "Installed add-ons" |
@@ -2382,6 +2392,16 @@ msgstr "" | |||
msgid "No" | |||
msgstr "" | |||
|
|||
#. Default: "No addons available for installation." | |||
#: components/manage/Controlpanels/Addons/AddonsControlpanel | |||
msgid "No Addon available" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
msgid "No Addon available" | |
msgid "No add-on available" |
|
||
#. Default: "No installed addons." | ||
#: components/manage/Controlpanels/Addons/AddonsControlpanel | ||
msgid "No Installed available" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
msgid "No Installed available" | |
msgid "No installed add-ons available" |
|
||
#. Default: "Press Enter to update this addon" | ||
#: components/manage/Controlpanels/Addons/AddonItem | ||
msgid "Press Enter to update this addon" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
msgid "Press Enter to update this addon" | |
msgid "Press Enter to update this add-on" |
@@ -3812,6 +3852,11 @@ msgstr "" | |||
msgid "Third" | |||
msgstr "" | |||
|
|||
#. Default: "This addon was updated. Current profile installed version is {installedVersion}. New available profile version is {newVersion}" | |||
#: components/manage/Controlpanels/Addons/AddonItem | |||
msgid "This addon was updated. Current profile installed version is {installedVersion}. New available profile version is {newVersion}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
msgid "This addon was updated. Current profile installed version is {installedVersion}. New available profile version is {newVersion}" | |
msgid "This add-on was updated. Current profile installed version is {installedVersion}. New available profile version is {newVersion}." |
msgid "Updates available" | ||
msgstr "" | ||
|
||
#. Default: "Upgradable addons" | ||
#: components/manage/Controlpanels/Addons/AddonsControlpanel | ||
msgid "Upgradable addons" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
msgid "Upgradable addons" | |
msgid "Upgradable add-ons" |
@@ -0,0 +1 @@ | |||
Overhaul Addons control panel with accessible UI (react-aria-components) akin to Plone Classic @deodorhunter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overhaul Addons control panel with accessible UI (react-aria-components) akin to Plone Classic @deodorhunter | |
Overhaul Add-ons control panel with accessible user interface (react-aria-components) akin to Plone Classic UI. @deodorhunter |
/> | ||
| ||
<a | ||
href="https://6.docs.plone.org/install/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hold on this. We are in the process of updating the documentation, and the new page is not yet released. See https://github.com/plone/volto/pull/6397/files#diff-5ac1c30eabae6878f93007dc64b3129cc05eaa5f878cd274fc27779edd410276
href="https://6.docs.plone.org/install/" | |
href="https://6.docs.plone.org/volto/development/add-ons/install-an-add-on.html" |
@ichim-david thanks for the ping. "add-on" is hyphenated in narrative documentation and any public UI element. "addon" is preferred in code. Where the spelling of "successfully" was corrected, I also corrected the hyphenation of "add-on", but only in However, I don't know if changing all the non-hyphenated instances of "addon" in the In any case, it bugs me that we don't use the correct hyphenation or spelling when displaying the text to end users. Perhaps we deal with this misspelling (and probably others that I never reviewed) in a future PR and 18.1 release? "Upgradeable" is a variant spelling of "upgradable" in American English. Both spellings are acceptable and interchangeable. |
If you change it you lose the translations and you need to add them back manually. I added a bug report here #6159 but that was as far as I got.
@deodorhunter there you have it as I've mentioned here #6345 (comment) I was wrong to jump to the conclusion that it wasn't correct so given how many mentions you have already and since it's also valid there is no point in changing it. @deodorhunter @stevepiercy Having in the aria-label and visible text add-on instead of addon made a considerable change to how VoiceOver spelled the word so we need to change it, being ok to have it in the code variables due to - not being acceptable. |
@pnicolli given Victor announcement that a48 is the final this for sure won't make it in 18 final but having it in 18.1 means that you get more feedback besides my own, I know that @JeffersonBledsoe also wanted to add something but cannot do it until tomorrow. |
In that case, let's not change existing |
@ichim-david yeah after reading replies here I briefly texted Victor to pull the trigger without waiting for this. I am just afraid this will become stale if we go too deep in optimization. I would like to set a goal to have this finished by the end of the month at the latest. |
We can change the defaultMessage of existing translations but leave the msgid the same. |
Added in 21505f5. |
This PR overhauls current Addons Control panel UI using react-aria-components and solves #5142.
All accordions removed, UI is now akin to Plone Classic.
Aria pattern used: ARIA grid pattern through GridList component
Changelog:
@plone/types
@plone/types
packageUI Preview