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

A few accessibility tweaks #4652

Merged
merged 12 commits into from
Nov 25, 2020
Merged

A few accessibility tweaks #4652

merged 12 commits into from
Nov 25, 2020

Conversation

PVince81
Copy link
Member

See individual commit descriptions.

I originally tried to go further and add invisible text to make it say "Message from Alice: hello" but somehow the screen reader doesn't read it in once sentence.
Also I was hoping that ul/li would make navigation easier like making it read each row in the participant list or messages list, but it rather reads individual blocks inside a row. Maybe we'll need to introduce links there at some point... would make it possible to link to messages. In the conversation list we have links and it works well there.

Needs further separate research.

Defined specific region roles for easier access to:
- conversation settings: navigation role define by the component itself,
  we use a custom label here.
- conversation messages
- new message form

Note: so far the call button and conversation settings are part of the
main content, not the messages list. This could be tweaked further
later on.

The right sidebar is already recognized as "complementary".

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Added missing aria labels on some buttons.
Improved aria labels for list items and list buttons to be uniquely
identified by including the conversation or participant name.
The click event for participant search is now optional, this prevents
screen readers to say "clickable" when it's not.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Hide an extra "li" that was read as "one list item".
Prevent saying "heading level 6" for h6 elements.
Hide the already hidden file input dialog so one cannot tab to it.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
The screen reader now identifies those as lists and announces how many
rows they contain.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
@PVince81
Copy link
Member Author

regarding the "conversation list navigation" region, it will only fully work once nextcloud-libraries/nextcloud-vue#1585 is merged and updated here.

This way it makes it clearer that it's the message author.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Screen reader will qualify them as such.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Makes it possible to select results by tabbing over them and hitting
enter.

Removed avatar menu from search results.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
@@ -31,7 +31,7 @@
:author-id="actorId"
:display-name="actorDisplayName" />
</div>
<div class="messages">
<ul class="messages">
Copy link
Member

Choose a reason for hiding this comment

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

The list is ol though, as it’s ordered, no?

Copy link
Member Author

Choose a reason for hiding this comment

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

indeed, had the same thought.
technically doesn't make a difference for assistive technologies from what I read

Copy link
Member

@marcoambrosini marcoambrosini Nov 22, 2020

Choose a reason for hiding this comment

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

The only difference afaik is visual in default styles. Bullets in ul and umbers in ol

Copy link
Member

Choose a reason for hiding this comment

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

Also when scrolling up new items would be added and therefor all numbers would change. sounds confusing?

Comment on lines +50 to +51
role="region"
:aria-label="t('spreed', 'Post message')" />
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this go within the newmessageform component?

Copy link
Member Author

Choose a reason for hiding this comment

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

not this one: see I've defined a "role=region" which means that screen readers will announce this section as a region.
with a screen reader you have the option to jump directly to a specific region of the screen from anywhere.

Copy link
Member Author

Choose a reason for hiding this comment

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

seems I had a separate PR for the other missing aria-label, see #4648

Copy link
Member

Choose a reason for hiding this comment

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

Just sayinh that maybe those 2 lines should go here?


Aren't they going to end up on the newmessageform root element anyway?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes and no

We need to keep the aria-label here so that the region itself has a name. The screen reader will announce it "Entering post message region" when tabbing into it, even if you tab onto the file upload button first so we should not set the region on the post message field.

I agree that the field itself also needs an aria-label.

Copy link
Member Author

Choose a reason for hiding this comment

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

I've cherry-picked my changes from the other PR here to make it more complete.

Please let me know whether you understood the region thing. I can demo it to you if you like.

@@ -31,7 +31,7 @@
:author-id="actorId"
:display-name="actorDisplayName" />
</div>
<div class="messages">
<ul class="messages">
Copy link
Member

@marcoambrosini marcoambrosini Nov 22, 2020

Choose a reason for hiding this comment

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

The only difference afaik is visual in default styles. Bullets in ul and umbers in ol

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
- h2 for the date which groups messages
- h3 for actor display name and quote actor
- replaced h6 with span for the date indicators on the right side

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
These lis are used as containers for the actual list, so no need to have
the screen reader say "list with one item" every time.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Copy link
Member

@marcoambrosini marcoambrosini left a comment

Choose a reason for hiding this comment

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

tested and I see no design regressions due to tag changes :)

@PVince81 PVince81 merged commit 59288cd into master Nov 25, 2020
@PVince81 PVince81 deleted the bugfix/noid/a11y-improvements branch November 25, 2020 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants