improve accessibility by providing metadata for UI elements
ClosedPublic

Authored by mgallien on Jun 5 2019, 3:40 PM.

Details

Summary

Add metadata while preserving the string freeze to help a screen reader when navigating with keyboard

Test Plan

Tested under plasma with orca

Diff Detail

Repository
R255 Elisa
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
mgallien requested review of this revision.Jun 5 2019, 3:40 PM
mgallien created this revision.

Is there any accessibility dedicated review group ?

Having recently read this https://raphaelhertzog.com/2011/06/24/people-behin-debian-sam-hartman-kerberos-package-maintainer/ got me motivated to improve Elisa with regard to screen reader accessibility.

ngraham added a subscriber: ngraham.

There's Plasma Accessibility which is maybe good enough? Might be worth it for us to create a more generic one though.

src/qml/PlayListEntry.qml
57

This avoids breaking the string freeze, true, but could also lead to inappropriate translated strings. I guess we commit this to 0.4 and then change it to use i18n() on master?

mgallien added inline comments.Jun 5 2019, 5:10 PM
src/qml/PlayListEntry.qml
57

That is the idea yes.

ngraham accepted this revision.Jun 5 2019, 5:34 PM

LGTM then! Nice improvement.

This revision is now accepted and ready to land.Jun 5 2019, 5:34 PM
davidedmundson added inline comments.
src/qml/GridBrowserDelegate.qml
165

A button without a press action sounds wrong.

ngraham added inline comments.Jun 5 2019, 7:50 PM
src/qml/GridBrowserDelegate.qml
165

It has onClicked a few lines below:

onClicked: enqueue(databaseId, mainText)

Or am I misunderstanding?

Blind people rarely click. Some a10y software has a way to trigger actions directly.

Accessible.onPressAction: onClicked

Would probably suffice.

mgallien planned changes to this revision.EditedJun 5 2019, 8:38 PM

Blind people rarely click. Some a10y software has a way to trigger actions directly.

Accessible.onPressAction: onClicked

Would probably suffice.

Thanks for your review. I had missed completely this fact before your review.
I will fix all of them.

Woe :) cool this looks very promising.
you can just add Plasma Accessibility i will try to review then as soon as i find time :)
thanks for care about that :).

as you already planned changes i will wait for an test til those are done.
an small thing we need to take care, is that also the current active element gets the focus. screenreaders react to the "focus:true" property to present the current active element.
in Kickoff this is an issue. I will test this here next couple of days.
Thanks!!! :).

an small thing we need to take care, is that also the current active element gets the focus. screenreaders react to the "focus:true" property to present the current active element.
in Kickoff this is an issue. I will test this here next couple of days.
Thanks!!! :).

In fact that was just improved/fixed yesterday in D21081!

Blind people rarely click. Some a10y software has a way to trigger actions directly.

Accessible.onPressAction: onClicked

Would probably suffice.

Does this mean that every button with onClicked ideally also needs Accessible.onPressAction: onClicked too?

an small thing we need to take care, is that also the current active element gets the focus. screenreaders react to the "focus:true" property to present the current active element.
in Kickoff this is an issue. I will test this here next couple of days.
Thanks!!! :).

In fact that was just improved/fixed yesterday in D21081!

Ahh sweet:). Thanks! Yea those pseudo rectangles are used very often without proper focus handling. Thats why i told :).

Blind people rarely click. Some a10y software has a way to trigger actions directly.

Accessible.onPressAction: onClicked

Would probably suffice.

Does this mean that every button with onClicked ideally also needs Accessible.onPressAction: onClicked too?

For Press this is not needed. I dont know where is the difference between press and click as the documentation tells the same.
https://doc.qt.io/qt-5/qml-qtquick-controls2-abstractbutton.html#pressed-signal
https://doc.qt.io/qt-5/qml-qtquick-controls2-abstractbutton.html#clicked-signal

I would feel better if pressed is used for buttons. As klick sounds more like mouse is required also the documentation says different.

mgallien updated this revision to Diff 59298.Jun 6 2019, 8:41 PM
  • add Accessible.onPressAction handler to interact with screen readers
This revision is now accepted and ready to land.Jun 6 2019, 8:41 PM

i think you don't need the
"Accessible.onPressAction"
stuff when you use

  • onPressed

insteed of :

  • onClicked

i never used it with onPressed and it worked always just fine :).
but it should work too. just curious for my own interest, is there a reason why always onClicked is used instead of onPressed? As for me it sounds more natural to press an button. does anyone know the exact difference? as i can read from the QT docu its the same? is it?

i think you don't need the
"Accessible.onPressAction"
stuff when you use

  • onPressed insteed of :
  • onClicked

    i never used it with onPressed and it worked always just fine :). but it should work too. just curious for my own interest, is there a reason why always onClicked is used instead of onPressed? As for me it sounds more natural to press an button. does anyone know the exact difference? as i can read from the QT docu its the same? is it?

When reading Qt documentation, I understand it as specifically activated by screen readers. This is also what @davidedmundson recommended in its review.

[...]

Blind people rarely click. Some a10y software has a way to trigger actions directly.

Accessible.onPressAction: onClicked

Would probably suffice.

Does this mean that every button with onClicked ideally also needs Accessible.onPressAction: onClicked too?

For Press this is not needed. I dont know where is the difference between press and click as the documentation tells the same.
https://doc.qt.io/qt-5/qml-qtquick-controls2-abstractbutton.html#pressed-signal
https://doc.qt.io/qt-5/qml-qtquick-controls2-abstractbutton.html#clicked-signal

I would feel better if pressed is used for buttons. As klick sounds more like mouse is required also the documentation says different.

As far as I know (and a confirmation by reading Qt source), pressed and clicked should probably be different. I remember having read (not remembering the reference at the moment) that "clicked" is the action of pressing and un pressing the button.

mgallien updated this revision to Diff 59363.Jun 7 2019, 6:56 PM
  • add Accessible.onPressAction handler to interact with screen readers

rebase on top 0.4

Should I make further modifications or land the current patch ?

As far as I know (and a confirmation by reading Qt source), pressed and clicked should probably be different. I remember having read (not remembering the reference at the moment) that "clicked" is the action of pressing and un pressing the button.

Yes that's correct, from this stackexchange answer:

  • Pressed: event is generated when you push down the mouse button
  • Released: event is generated when you release the mouse button (which has been pressed down before)
  • Clicked: event is generated when a mouse button Pressed & Released.
chempfling accepted this revision.Jun 11 2019, 10:21 PM

Thanks for clearification :) . Again what learned.
Looks good to me!

ngraham accepted this revision.Jun 12 2019, 3:13 PM
This revision was automatically updated to reflect the committed changes.

By the way: Thanks for care about accessibility! this is awsome :).

By the way: Thanks for care about accessibility! this is awsome :).

Thanks a lot for your comment.
I consider that proper accessibility is one of the thing that is/was lacking in Elisa and should be taken for granted.

Thanks a lot for your comment.
I consider that proper accessibility is one of the thing that is/was lacking in Elisa and should be taken for granted.

you are completly right.
A11y is important in enterprise sector. thats why i created T11074 its very needed and its already too long out of scope