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

Accessibility enhancements #752

Merged
merged 27 commits into from
Jan 5, 2021
Merged

Conversation

plweil
Copy link
Contributor

@plweil plweil commented Aug 25, 2020

addresses #751

Adds the following accessibility enhancements:

  • Table header sort buttons. Can be reached via the keyboard. Dynamically labeled "Sort table by [column] in [ascending/descending] order." Buttons are absolutely positioned to cover the entire th box. The pseudo-elements for the "sort arrows" are placed on the button element instead of the th.

  • aria-sort attribute to inform user of the current sort order. E.g., aria-sort="ascending".

  • th elements are given an explicit role of columnheader to accommodate aria-sort.

  • "sort arrows" via pseudo-elements w/chevron backgrounds left intact, except border color is darkened to improve color contrast.

  • Table search: add label element to provide accessible name, which is visually-hidden but accessible to screen readers via new sr-only css class. Magnifying glass is darkened for color contrast. placeholder attribute is set to null by default (placeholders might look good to some, but they are an inadequate substitute for labels, and can cause problems for a range of users.).

  • The bottom footer area is changed as little as possible while increasing the font size ; darkening the color; removing Vuetify css for the select element; adding a label element; separating the pagination info from the Previous and Next page buttons for improved clarity; changing the latter to button elements; change the default button label from 'Prev' to 'Previous'; add some margins, etc. to clean up appearance. Button focus outlining is restored; outlines are important for AT users and should not be removed.

  • no changes were made to 'pages' pagination mode. I can't help but think that a solution with page number buttons instead of manually entering a page number would be better. But I don't have enough time to work on that right now.

  • My chief concern here is accessibility and UI clarity. I don't have a strong opinion regarding the darker colors added here; these colors at least provide an example of better contrast. See, for example the WET project.

@plweil plweil mentioned this pull request Sep 1, 2020
Copy link
Owner

@xaksis xaksis left a comment

Choose a reason for hiding this comment

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

hey @plweil have you tested these changes on IE? A while back we had a lot of issues with wrapping rows/tds in templates because IE wouldn't render them.
here's the relevant issue #138
I would like to drop support for IE in the near future but for now there are still a lot of people using it there.

@p0psicles
Copy link
Collaborator

@xaksis tbh people shouldn't be using IE anymore. And you could choose to bump to major version, when dropping IE support. That way projects that choose to keep supporting IE can lock the version. And we can move on.

@plweil
Copy link
Contributor Author

plweil commented Oct 18, 2020 via email

@plweil
Copy link
Contributor Author

plweil commented Oct 18, 2020 via email

@xaksis
Copy link
Owner

xaksis commented Oct 20, 2020

@p0psicles you're right. Dropping IE support is the logical thing to do for the next major version. @plweil I very much want most of these changes in the current build. From what I can tell, the only thing that'd cause problems is the changes where you wrap thead contents in templates. Is it possible to create a PR without that change? We can save that one for when we bump up the major.
Also, if you could remove the built files from the PR that'd be great - it'll always cause conflict otherwise.

@@ -231,14 +239,13 @@
:formattedRow="formattedRow(row)"
:index="index"
>
<span v-if="!column.html">
<template v-if="!column.html">
Copy link
Owner

Choose a reason for hiding this comment

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

This bit here is what I'm talking about.

@plweil
Copy link
Contributor Author

plweil commented Oct 20, 2020 via email

@plweil
Copy link
Contributor Author

plweil commented Nov 12, 2020

@xaksis I'm just getting back to this. Sorry for the delayed response. I'm aware of problems with IE and the element, but I always thought that these occur when is used outside the section of a component. But no matter. Removing the wrappers in the lines you cite should be fine. It'll just wrap those cell contents in an extra , which is not optimal but no big deal. I'll make that change and remove the built files from the PR shortly.

@plweil
Copy link
Contributor Author

plweil commented Dec 7, 2020

@xaksis do you need anything else from me to merge this, or is this ok? I did remove the built files.

@xaksis
Copy link
Owner

xaksis commented Dec 7, 2020

hey @plweil sorry, the PR seems to still include built files and is showing me a bunch of conflicts there so wasn't sure if you were done. Do you mind taking a look maybe it wasn't committed?

@plweil
Copy link
Contributor Author

plweil commented Dec 7, 2020 via email

@plweil
Copy link
Contributor Author

plweil commented Dec 14, 2020

Sorry if I'm being dense about this, but I thought I deleted the built files in commit 067cabe. What am I doing wrong?

@p0psicles
Copy link
Collaborator

You shouldn't delete them. You should copy the files from master into your branch. That way there is no change to them.

@plweil
Copy link
Contributor Author

plweil commented Dec 14, 2020

Oh jeez. Thank you @p0psicles. I've re-added the built files from master.

@plweil
Copy link
Contributor Author

plweil commented Jan 4, 2021

@xaksis All good now?

@xaksis xaksis merged commit 89c33c1 into xaksis:master Jan 5, 2021
@xaksis
Copy link
Owner

xaksis commented Jan 5, 2021

@plweil done! Thank you for your contribution and a very Happy New Year!
A side note, there were some critical style issues being caused by default user-agent styles of various browsers for buttons. Which I normalized so hopefully version 2.21.2 is good 👍

@plweil
Copy link
Contributor Author

plweil commented Jan 6, 2021

@xaksis good deal and thank you! Happy New Year to you too!

@plweil
Copy link
Contributor Author

plweil commented Oct 1, 2021

@xaksis I'm working on a followup a11y PR -- do I still need to account for IE support?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants