Skip to content
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

[WIP] fix(esco-content-menu): accessibility improvements #440

Conversation

jonathanmtran
Copy link

@jonathanmtran jonathanmtran commented Sep 26, 2019

We've made various tweaks to the content grid to improve accessibility

  • added an aria-live region to announce when a portlet is added/removed from favorites
  • slightly restructured the element such that the favorite button isn't part of the a element
  • removed a CSS rule that removed the outline on the favorite button as a focus indicator wouldn't be shown in chrome

supersedes PR #428
resolves issue #431
resolves issue #438

@jgribonvald
Copy link
Contributor

jgribonvald commented Sep 27, 2019

@jonathanmtran your change on PortletCards about the href part are welcome but this will broke the content-favorites where this is used, so please try to repeat this change on the whole view of the component, ie the esco-hamburger-menu or at least the content-menu.

Also did you test the builded component from the demo page as example ?

@jonathanmtran jonathanmtran changed the title fix(esco-content-menu): accessibility improvements [WIP] fix(esco-content-menu): accessibility improvements Sep 27, 2019
@jonathanmtran
Copy link
Author

I should have tagged this as work in progress as the changes were done in order for us to be allowed to deploy esco-content-grid to production, but yeah I imagined that the other components in the esco suite of components need to be looked at as well.

@jgribonvald
Copy link
Contributor

@jonathanmtran could you refresh your WIP ? I have a chance to make a review on this work.
thanks

@jgribonvald
Copy link
Contributor

Also for your development please test the deployment on an uPortal instance, some parts won't works like in the vue-cli-service serve (npm start).

Thanks

@jonathanmtran
Copy link
Author

@jgribonvald My branch has been rebased against master

Copy link
Contributor

@jgribonvald jgribonvald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some change are required as it seems that some things are missing, also the change applied on content-grid + portletCard weren't applyed on favoritesContent. A change on this part is required if you want to change the href position around portletCard.

Also did you make a test on builded sources within an uPortal instance ?

@@ -46,31 +46,24 @@
</div>
</slot>
</div>
<div class="status sr-only" aria-live="polite">{{ statusMsg }}</div>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To add the sr-only class you need to import the css common part as after building the sr-only class isn't provided !
@import './../styles/common.scss'; should be added to style part

Copy link
Contributor

@jgribonvald jgribonvald Nov 18, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't find any information change about the status, is it shown only after clicking on add/remove the favorite link ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To add the sr-only class you need to import the css common part as after building the sr-only class isn't provided !
@import './../styles/common.scss'; should be added to style part

Will do. Thanks

I can't find any information change about the status, is it shown only after cliquing on add/remove the favorite link ?

It isn't shown at all. The goal of this change is to provide feedback to a user using a screen reader that a portlet has been favorited/unfavorited

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't find any information change about the status, is it shown only after cliquing on add/remove the favorite link ?

It isn't shown at all. The goal of this change is to provide feedback to a user using a screen reader that a portlet has been favorited/unfavorited

OK so for accessibility changing the icon and message to favorited from unfavorited state (and the reverse action) isn't enough !

@@ -5,8 +5,10 @@
"filter": "Find a service..."
},
"favorites": {
"add": "Add to favorites",
"remove": "Remove from favorites",
"add": "Add \"{}\" to favorites",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like something is missing as I can't see change that pass a param for the translation.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also could you provide the same change on French files, and a French people will fix it if something is needed don't be worried !

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like something is missing as I can't see change that pass a param for the translation.

In favoriteMessage() in ActionFavorites.vue and in actionToggleFav() in ContentGrid.vue, I'm doing a string replacement to replace the {} placeholder with the name of the portlet. If there's a better way to accomplish this, please advise.

Also could you provide the same change on French files, and a French people will fix it if something is needed don't be worried !

I updated the French language files. Hope it's a good starting point

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 🥇

@jonathanmtran
Copy link
Author

Also did you make a test on builded sources within an uPortal instance ?

Yes. I've tested the resulting Webjar against a clean copy of uPortal-start. As far as I'm aware, the admin tools tab/layout is using the <esco-content-grid>. Are there other places where this family of components is being used?

@jgribonvald
Copy link
Contributor

Also did you make a test on builded sources within an uPortal instance ?

Yes. I've tested the resulting Webjar against a clean copy of uPortal-start. As far as I'm aware, the admin tools tab/layout is using the <esco-content-grid>. Are there other places where this family of components is being used?

Firstly you can test the whole part from the project in running npm start, but watch on the App.vue if the content-menu (at least) is activated (you can test with the hamburger-menu which is the complete component, uncomment it in this case).
Else for inside the portal you have this Pull Request to apply uPortal-Project/uPortal-start#239 (but the PR may need a refresh, let me know in this case)

@ChristianMurphy ChristianMurphy added the work in progress changes are still being developed, don't merge yet label Nov 20, 2019
@ChristianMurphy
Copy link
Member

@jonathanmtran friendly ping, is this still in progress?

@jonathanmtran
Copy link
Author

I haven't had the time to remediate the other components in this family of components, so I'll be closing this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
work in progress changes are still being developed, don't merge yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants