This patch fixes the problem that toggling one of the options in the
user account dialog will automatically submit the form.
The problem got introduced as a combination of the recent accessibility
fixes where some elements got turned into HTML button elements to make
them keyboard accessible. Doing that, I did not realize that the default
type of a button is `submit` [1]. This causes no problems at most places,
but will cause problem within a form (e.g. the user account settings)
where toggling an option is now identical to clicking submit.
This patch fixes the issue by setting the `type` attribute to `button`.
Not only for the toggle switch, but also for a few other elements which
have been recently converted to buttons.
[1] https://www.w3.org/TR/2011/WD-html5-20110525/the-button-element.html#attr-button-type
This patch fixes several problems of the settings menu related to
display on mobile devices or small(ish) windows:
- The `isMobileLandscape` is now calculated correctly. Previously, this
was set to `true` if a device was in portrait mode.
- Showing the button to collapse the settings menu and making the menu
collapsible now use the same mechanism. Previously, it could happen
that the menu was opened and not fixed, but no button to close it
again was shown.
- The icons fore opening and closing the settings menu are now both
arrows, indicating that their functionality is reversed.
- The button to open the menu now always has the string “Settings”,
instead of using the name of the current page. The current page hader
is listed below that anyway and this is the action component to open
the settings menu after all.
This fixes#1334
This patch should fix most of the problems for users trying to access
the user settings via screen reader. It makes sure user interface
elements can be reached via keyboard and provides proper labels, roles
and values so you not only can interact with elements but also know what
you are actually changing.
While not focused on other views, this should also already fix a number
of accessibility issues with other settings pages.