-
Notifications
You must be signed in to change notification settings - Fork 344
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 and usability fixes #1134
a11y and usability fixes #1134
Conversation
I don't know why, but when I'm expanding the sources, the sources are not displaying. |
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.
Thanks, I added some notes.
templates/home.phtml
Outdated
<?php endif; ?> | ||
|
||
<a id="nav-copyright" href="https://selfoss.aditu.de" target="_blank" rel="noopener noreferrer">selfoss <?= \F3::get('version'); ?></a> | ||
<a id="nav-copyright" href="https://selfoss.aditu.de" target="_blank" rel="noopener noreferrer"><?= trim(\F3::get('html_title')); ?> <?= \F3::get('version'); ?></a> |
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 think this is an information about the version of the software so it should probably always be selfoss, rather than the name administrator chooses for a given installation. Though I would argue that user should not need to care about what program this really is so I would move it to the settings.
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 think this is an information about the version of the software so it should probably always be selfoss, rather than the name administrator chooses for a given installation. Though I would argue that user should not need to care about what program this really is so I would move it to the settings.
Actually, I think for the better user experience, the name should be retrieved from the settings itself.
Also, since URL is unchanged and leads the user to the selfoss homepage, it should be fine. rest, it is your choice.
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.
Also, since URL is unchanged and leads the user to the selfoss homepage, it should be fine.
Well this is precisely my point. I would expect the label to match the target URL so that user knows where will it lead before visiting it.
Also it is followed by a selfoss version number, which, I think, does not make sense when combined with a custom title.
I would just remove this link altogether, as it does not add much value while cluttering the sidebar.
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.
Also, since URL is unchanged and leads the user to the selfoss homepage, it should be fine.
Well this is precisely my point. I would expect the label to match the target URL so that user knows where will it lead before visiting it.
Also it is followed by a selfoss version number, which, I think, does not make sense when combined with a custom title.
I would just remove this link altogether, as it does not add much value while cluttering the sidebar.
Yeah, removing is also a better option.
It will be great.
Also, when will you commit your changes so that I can pull them and work further?
I also want to introduce a heading level1 on th home page because user always looks for the main heading I.E: h1 for reading about the website/application and for the main content. Since main content is already present, where and with which content we should add h1?
@@ -49,10 +49,10 @@ selfoss.events.entriesToolbar = function(parent) { | |||
if (parent.find('.entry-toolbar').has('button.entry-share' + shares[0]).length == 0) { | |||
// add the share toolbar entries | |||
parent.find('.entry-smartphone-share button.entry-newwindow').after(selfoss.shares.buildLinks(shares, function(name) { | |||
return '<button class="entry-share entry-share' + name + '" title="' + name + '"><img class="entry-share" title="' + name + '" src="images/' + name + '.png" height="16" width="16">' + name + '</button>'; |
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.
Why use aria-haspopup
? It opens a new tab/window, not a popup.
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.
Why use
aria-haspopup
? It opens a new tab/window, not a popup.
You are right, but, since it behaves like link, either it should be changed to link, or if it is required to keep it button, then aria-haspopup is best bet for this. Since, normal buttons are not supposed to open any new tab/page
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 will defer to you on this. Unfortunately, we cannot use link, as some sharers work in the background (e.g. copy to clipboard, share with operating system menu).
Maybe we could improve the button labels.
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 will defer to you on this. Unfortunately, we cannot use link, as some sharers work in the background (e.g. copy to clipboard, share with operating system menu).
Maybe we could improve the button labels.
No problem, we can improve the labels.
Should I do something or you're already doing?
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 will push the changes shortly.
So, should I wait for your commits in order to fix things further?
…On 9/23/19, Jan Tojnar ***@***.***> wrote:
jtojnar commented on this pull request.
> <ul id="nav-tags">
<li class="active nav-tags-all" role="link"
tabindex="0"><span role="listitem"><?=
\F3::get('lang_alltags')?></span></li>
</ul>
- <h2 id="nav-sources-title" class="nav-sources-collapsed"
tabindex="0" aria-expanded="false"><span role="link"><?=
\F3::get('lang_sources') ?></span></h2>
+ <h2 id="nav-sources-title" class="nav-sources-collapsed"
tabindex="0"><span role="link" aria-expanded="false"><?=
\F3::get('lang_sources') ?></span></h2>
Sure. Will update the scripts and the styles later today.
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#1134 (comment)
|
They are displaying now, but screen reader is not treating them as list still after changing the code. |
Feel free to address what you like, I will be back from school in two or three hours and then will take a jab at it. |
Sure, also, if you find anything wrong in the code, try to remove my changes. |
Ok, thanks
…On 9/23/19, Jan Tojnar ***@***.***> wrote:
jtojnar commented on this pull request.
> @@ -49,10 +49,10 @@ selfoss.events.entriesToolbar = function(parent) {
if (parent.find('.entry-toolbar').has('button.entry-share' +
shares[0]).length == 0) {
// add the share toolbar entries
parent.find('.entry-smartphone-share
button.entry-newwindow').after(selfoss.shares.buildLinks(shares,
function(name) {
- return '<button class="entry-share entry-share' + name + '"
title="' + name + '"><img class="entry-share" title="' + name + '"
src="images/' + name + '.png" height="16" width="16">' + name +
'</button>';
I will push the changes shortly.
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#1134 (comment)
|
Yup, they are in the headings above, which is why I suggested to use Though, I would also be worried the screen reader will now read the label twice:
|
Pushed the changes. removed the duplicated strings and used aria-labeledby |
I left out the |
I am looking at adding the buttons to the entry titles some more and there is an issue: micro-articles such as tweets can contain links inside the titles. For that reason we cannot really make the whole title clickable. I am not sure how to represent that properly. |
For now, I have made the I have also rebased this onto master and it is ready to be merged, pending a review from @niol regarding the latest commit. |
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.
Looks good
I've just checked your example, no problem, screen readers are recognising every link as individual link and there's no problem with the readability also. |
If we'll make the whole title clickable, won't the user be able to click the individual links contained in the title? |
That’s great.
Unfortunately, HTML does not allow interactive elements inside links or buttons, so we cannot use the native elements. I would say the
Not if we use native HTML elements. |
oh, ok. fine. let's stick with role="link" as of now. if there will be
any issue, then we'll look forward for role="button"
…On 9/24/19, Jan Tojnar ***@***.***> wrote:
> I've just checked your example, no problem, screen readers are recognising
> every link as individual link and there's no problem with the readability
> also.
That’s great.
> I feel that since screen readers are not having any problem with the links
> contained in the title, can't we just make the entry title button as
> before? I don't think that it will cause problems.
Unfortunately, HTML does not allow interactive elements inside
[links](https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-a-element:concept-element-content-model)
or
[buttons](https://html.spec.whatwg.org/#the-button-element:concept-element-content-model),
so we cannot use the native elements. I would say the `link` role fits
better than the `button`, since expanding the item also changes the URL hash
to point to that page.
> If we'll make the whole title clickable, won't the user be able to click
> the individual links contained in the title?
Not if we use native HTML elements.
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#1134 (comment)
|
Is there any way to identify that which filter, source and tag is
currently active and put aria-current on it?
…On 9/24/19, Akash Kakkar ***@***.***> wrote:
oh, ok. fine. let's stick with role="link" as of now. if there will be
any issue, then we'll look forward for role="button"
On 9/24/19, Jan Tojnar ***@***.***> wrote:
>> I've just checked your example, no problem, screen readers are
>> recognising
>> every link as individual link and there's no problem with the
>> readability
>> also.
>
> That’s great.
>
>> I feel that since screen readers are not having any problem with the
>> links
>> contained in the title, can't we just make the entry title button as
>> before? I don't think that it will cause problems.
>
> Unfortunately, HTML does not allow interactive elements inside
> [links](https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-a-element:concept-element-content-model)
> or
> [buttons](https://html.spec.whatwg.org/#the-button-element:concept-element-content-model),
> so we cannot use the native elements. I would say the `link` role fits
> better than the `button`, since expanding the item also changes the URL
> hash
> to point to that page.
>
>> If we'll make the whole title clickable, won't the user be able to click
>> the individual links contained in the title?
>
> Not if we use native HTML elements.
>
> --
> You are receiving this because you authored the thread.
> Reply to this email directly or view it on GitHub:
> #1134 (comment)
|
Good idea. Will do that. |
Thanks bro.
…On 9/24/19, Jan Tojnar ***@***.***> wrote:
Good idea. Will do that.
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#1134 (comment)
|
I'm waiting for the pagination implementation and will try to fix some
things if required in that as well
…On 9/24/19, Akash Kakkar ***@***.***> wrote:
Thanks bro.
On 9/24/19, Jan Tojnar ***@***.***> wrote:
> Good idea. Will do that.
>
> --
> You are receiving this because you authored the thread.
> Reply to this email directly or view it on GitHub:
> #1134 (comment)
|
@niol I refactored entry selection as well. Could you please take a look at it as well? |
I think the |
Thanks for your commits bro, it's working properly.
No issue so far.
…On 9/25/19, Akash Kakkar ***@***.***> wrote:
Thanks a lot for this, but now aria-expanded is not working for the
entry titles.
When we are clicking on an entry title, expanded="true" is not
happening. can you please look at this?
On 9/25/19, Jan Tojnar ***@***.***> wrote:
> I think the `aria-current` for navigation will be better handled in
> #1064
>
> --
> You are receiving this because you authored the thread.
> Reply to this email directly or view it on GitHub:
> #1134 (comment)
|
I have pushed the composer updates to master as there do not seem to be any breaking changes. As for the jQuery update, the security vulnerabilities do not affect us and there are many breaking changes regarding to The remaining deprecations and breaking changes should be addressed in 8e991c4, except for |
Added autocomplete to the user login form and made the title of the login form to retrieve from the configurations
Added the aria-label explicitly to some controls, because titles are treated as tooltip by the screen readers and some screen readers do not announce the tooltips. In this case user will not be able to understand that what the button does. Aria-label is a perfect fix for that
Users should not need to care, what version of selfoss are they running. Also cleaned up the sidebar button bar slightly, and fixed a bug where refresh button was always shown.
The headings for "filters", "tags" and "sources" are clickable like a link so, added the link role as well along with the heading. There was no need of aria-haspopup attribute, so removed all the references. Also, Filters, Tags etc are defined as a list but role="link" added to the list item because they work like a link, thus, screen readers do not treat them as a list, thus, added the role="listitem" also in the span so that screen reader properly recognise them as both list and link. Co-Authored-By: Jan Tojnar <jtojnar@gmail.com>
All the stories should be in h3 not in h2, so fixed that as well.
Removed maximum-scale and changed the user-scalable to user-scalable="yes". Setting the maximum-scale=1 and user-scalable=no makes the zooming useless and difficult for the low vision users. Please refer: https://a11yproject.com/posts/never-use-maximum-scale/ Changed some more things so that application can retrieve the title/name of the app from the configurations.
Fixed the zooming for OPML and hasspassword templates as well. Also added the main landmark.
Fixed some issues in sources.phtml template. made the favicon hidden by aria-hidden="true" because alt="" is not a efficient practise.
Added the access keys for the common controls for the better user experience and also added some aria attributes.
For easier and effective navigation…
Also wrap the contents of `.entry-title` with `span[role=link].entry-title-link` which is now the holder for the `aria-expanded` attribute. This will improve the accessibility of the entry page. Unfortunately, it might cause some issues with tweets, that can contain links in the title. Also change the focus target when navigating using keyboard to that link, since it is tabindexed, unlike the icon, used previously.
Previously, we had a separate #fullscreen-entry element, where we copied the body of entry when opened on mobile. Now we are using CSS to make the original entry occupy the full viewport.
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.
What's in master/more-a11y seems to work with no obvious problem.
Thanks for all the help. |
Thanks a lot to you too and @niol As well. I'm really liking contributing with you people and I'm very happy with all your cooperation. |
Please open a new pull request. GitHub does not allow re-opening PRs that were merged anyway. Also please try to split commits that do several (even small) different things on different components into multiple commits. And use |
Sure! |
Hi @akash07k. Previously, it was not clear if selfoss was licensed under GPL 3 only, or also any later version. Could you clarify whether you are fine with licensing your contribution under Thanks again and sorry for the confusion. |
@jtojnar
|
Lots of accessibility and usability fixes. #1133