-
Notifications
You must be signed in to change notification settings - Fork 231
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
Fix issue 2293: click on read notification focus bug #2299
Fix issue 2293: click on read notification focus bug #2299
Conversation
81324af
to
37ea856
Compare
I'm ok with this, I doubt a typical user would tab through that part of the UI |
@@ -10,6 +9,11 @@ | |||
<span class="sr-only">Clear notification</span> | |||
<span aria-hidden="true" class="pficon pficon-close"></span> | |||
</button> | |||
<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.
I would only expect this button to exist if the notification is unread
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.
Maybe move it down after the notification message, too?
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.
Will do.
Are we doing anything from an accessibility perspective to notify the user that the event is unread? Bolding the text but not providing sr-only text somewhere isn't accessible. |
dist/scripts/templates.js
Outdated
@@ -7785,11 +7785,14 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function( | |||
|
|||
|
|||
$templateCache.put('views/directives/notifications/notification-body.html', | |||
"<div class=\"drawer-pf-notification-inner\" tabindex=\"0\" ng-click=\"$ctrl.customScope.markRead(notification)\">\n" + | |||
"<div class=\"drawer-pf-notification-inner\" tabindex=\"0\" ng-click=\"notification.unread && $ctrl.customScope.markRead(notification)\">\n" + |
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.
dist looks wrong
37ea856
to
73000d2
Compare
@jwforres I can do something like this to also indicate to a screen reader that the message is unread: <a
ng-if="notification.unread"
href=""
class="sr-only sr-only-focusable"
ng-click="$ctrl.customScope.markRead(notification)">
<span class="sr-only">Message Unread.</span><!-- this never becomes visible -->
<span>Mark Read?</span><!-- this does become visible -->
</a> However, this indicates "Read" by omission. Is that acceptable? We support a list of links following the message (though in practice I've not seen any with more than one link), so adding the "mark read" message here seems to make sense to me: Though @spadgett you mentioned margins. Think this could be better? Lastly, strong feelings about |
Your screenshot looks good to me, although I'd leave off the |
c82bf7f
to
ae57692
Compare
Agreed, no ?
…On Thu, Oct 19, 2017 at 9:35 AM, Sam Padgett ***@***.***> wrote:
Your screenshot looks good to me, although I'd leave off the ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2299 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABZk7WZg0ECmXUVapcPawZ36-xqgeLhDks5st1AlgaJpZM4P-IhP>
.
|
href="" | ||
class="sr-only sr-only-focusable" | ||
ng-click="$ctrl.customScope.markRead(notification)"> | ||
<span class="sr-only">Message Unread. </span> |
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.
nit: I'd pull this span
outside of the a
since it's not part of the action.
Dropping the |
ae57692
to
4286cae
Compare
/lgtm |
4286cae
to
33758b1
Compare
rebased /test |
/lgtm |
Automatic merge from submit-queue. |
Fix issue #2293
You can still click the notification to clear it, but now there is a
sr-only
button for tabbing. The gif below shows the tabbing experience. There is clearly a hidden element in the flow.@jwforres @spadgett