-
Notifications
You must be signed in to change notification settings - Fork 435
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
Changes from all commits
ae28569
83e1820
20cabbf
5881be7
ba1d389
4c66f59
bdf9d0c
bf4c9a2
c6a845b
e067f64
773be42
063fe16
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ | |
<template> | ||
<div class="message-group"> | ||
<div v-if="dateSeparator" class="message-group__date-header"> | ||
<span class="date">{{ dateSeparator }}</span> | ||
<span class="date" role="heading" aria-level="3">{{ dateSeparator }}</span> | ||
</div> | ||
<div class="wrapper"> | ||
<div class="messages__avatar"> | ||
|
@@ -31,7 +31,7 @@ | |
:author-id="actorId" | ||
:display-name="actorDisplayName" /> | ||
</div> | ||
<div class="messages"> | ||
<ul class="messages"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The list is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. indeed, had the same thought. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe 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? |
||
<Message | ||
v-for="(message, index) of messages" | ||
:key="message.id" | ||
|
@@ -42,7 +42,7 @@ | |
:actor-display-name="actorDisplayName" | ||
:show-author="!isSystemMessage" | ||
:is-temporary="message.timestamp === 0" /> | ||
</div> | ||
</ul> | ||
</div> | ||
</div> | ||
</template> | ||
|
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.
Shouldn't this go within the newmessageform component?
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.
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.
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.
seems I had a separate PR for the other missing aria-label, see #4648
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.
Just sayinh that maybe those 2 lines should go here?
spreed/src/components/NewMessageForm/NewMessageForm.vue
Line 24 in 1bce4b8
Aren't they going to end up on the newmessageform root element anyway?
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.
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.
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'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.