Basic accessibility support for Slint UIs by hunger · Pull Request #1294 · slint-ui/slint

2 min read Original article ↗

ogoffart

tronical

tronical

tronical

tronical

tronical

@ogoffart @hunger

…e interpreter

(untested)
It is added first so it fills padding and doesn't increase the enum size

Currently it only has a value for the interpreter

@ogoffart @hunger

@ogoffart @hunger

Make sure to get compilation error if the accessibile-role is not set or
not a constant.
Do not generate accessibility info for properties whose accessible-role
is none

@ogoffart @hunger

The repeater itself don't need the property, only the repeated component needs
They are being used by the accessible callback
this is especially important if the properties are aliases otherwise
they may get removed in a sub component

@ogoffart @hunger

Currently, bool property are mapped to string property at runtime because
we'll avoid to extand the vtable for now, we'll consider that later

@ogoffart @hunger

* Implement basic support for accessibility

This change reports the `accessible-*` properties that are supported by
the Slint compiler to Qt's accessibility framework.

This gets Slint very basic support for screen readers and similar
technology in a cross-platform manner.

@hunger

@hunger

@hunger

@hunger

* Add Checked property to state tracker

* Make slider focus-able and interactable with keyboard

* A11y: Implement value types

* Add slider with all the necessary support for value changes
* Improve the SpinBox accordingly

* Generate QAccessible constants using bindgen

Ignore enumsdocs fail: We will handle that when rebasing onto master.
No need to generate the code that expose the accessible property when we
target MCU, because they are dead code anyway on that platform
Co-authored-by: Simon Hausmann <hausmann@gmail.com>
Co-authored-by: Simon Hausmann <hausmann@gmail.com>
Co-authored-by: Simon Hausmann <hausmann@gmail.com>
Co-authored-by: Simon Hausmann <hausmann@gmail.com>
Co-authored-by: Simon Hausmann <hausmann@gmail.com>
Co-authored-by: Simon Hausmann <hausmann@gmail.com>
Co-authored-by: Simon Hausmann <hausmann@gmail.com>
Co-authored-by: Simon Hausmann <hausmann@gmail.com>
Property Trackers may not access their properties in any way while
notifying observers. So go through the event loop once before doing
that.

@hunger

@hunger

@hunger

@hunger

@hunger

@hunger

Co-authored-by: Simon Hausmann <hausmann@gmail.com>
Co-authored-by: Simon Hausmann <hausmann@gmail.com>
Make sure not to call into objects that got deleted while waiting
to go through the event loop once before acting on them.

@hunger

Co-authored-by: Simon Hausmann <hausmann@gmail.com>

@hunger

@hunger hunger changed the title Add Accessibility Support POC Basic Slint accessibility support

Jun 7, 2022

tronical

@hunger hunger changed the title Basic Slint accessibility support Basic accessibility support for Slint UIs

Jun 8, 2022

Be-ing