Topic: barrier-free, usability request

softcon premium asked 2 years ago


Expected behavior

Some elements of MDBootstrap are not user friendly in terms of user disabilities. For example, while the the mdbootstrap checkbox and radio buttons can be selected using tabbing, they cannot be activated using the enter key. This means MDBootstrap is currently not 100% acceptable for our clients, and we have had to resort to alternative solutions for those elements. Ideally all elements should have this option built in - perhaps via an extra parameter such as mdb-data-keypress="true"

Additionally, for the visually impaired, the ability to change the visual customisation of radio buttons and checkboxes (particularly the different states) is important. No framework has been able to provide a good solution for this yet. It would be nice for MDBootstrap to take the lead on it.


Grzegorz Bujański staff answered 2 years ago


At the moment, our checkboxes and radio work similarly to native checkboxes and radio. The native checkbox does not allow you to select it with enter - but you can do it with a space. For radio, use the arrows to change the selection.

Note that we cannot add selection options with enter - when the controls are in the form, enter causes the submit form. We try to make our components work the same as native elements, so we made a decision not to change the default behavior.


softcon premium commented 2 years ago

I added a keydown event to check for the Enter keycode - if found it triggers a "click" event.Spacebar isn't something the client expected as a selectable option, as other selectable items (buttons and links) work with an enter keypress.This is probably a bigger conversation surrounding usability expectations in general. But if the ability was built in for MDBootstrap to provide (optional) additional user-impaired actions on various elements then this could set a precedent for other frameworks to follow.


Grzegorz Bujański staff commented 2 years ago

I understand, but look at W3 documentation for checkbox: https://www.w3.org/TR/wai-aria-practices-1.1/#keyboard-interaction-5 there you will find information that the space is to change the state of the checkbox. It's not that we (or some other library / famework) decided not to add this feature. It's just the default behavior. W3 organization made such a decision and they certainly had many reasons for that. Probably one of them is the example with the form, where enter causes form submit.



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Premium
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 3.11.0
  • Device: PC
  • Browser: chrome, Edge, Firefox
  • OS: windows 10
  • Provided sample code: No
  • Provided link: No