Orange-OpenSource / Orange-Boosted-Bootstrap

Orange Boosted is an accessible, ergonomic and Orange branded framework based on Bootstrap
https://boosted.orange.com/
MIT License
192 stars 56 forks source link

Change text color of disabled form controls #2221

Open julien-deramond opened 1 year ago

julien-deramond commented 1 year ago

Prerequisites

Description

A change of text color is needed for disabled form controls for placeholders and/or values. They should use a light gray (#ccc).

MewenLeHo commented 1 year ago

I made some tests in a PR (not yet pushed) and applied #ccc on input text, select and texarea:

screenshot-localhost_9001-2023 09 06-15_59_37

Some notes:

*: a disabled input is an inactive element so yes normally contrast should not be an issue. But an inactive element in a form can normally become active when a certain action is performed by the user (validate consent by clicking on a checkbox for instance). So one can argue that the user will need to know what is inactive in order to understand how to activate it if needed and that's why inactive elements in a form must be accessible too. In a context of a form the fact that a form element is currently disabled is an information and we need to convey informations to all users including users with disabilities. (credit to @Aniort for the demonstration).

To do:

MewenLeHo commented 1 year ago

Side note: we can add a .is-disabled CSS class on the label of the disabled file input. screenshot-boosted orange com-2023 09 08-14_27_25

Edit: will be tackled by https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/pull/2222

MewenLeHo commented 1 year ago

Whole page with all (?) possible form elements:

screenshot-localhost_9001-2023 09 08-15_08_42

@louismaximepiton raised a question about the disabled quantity selector: since it has an editable field, should it turn grey when disabled?

MewenLeHo commented 1 year ago

Prototype for a new version of the disabled quantity selector using the same background than the rest of the disabled editable fields:

screenshot-localhost_9001-2023 09 13-09_55_03

julien-deramond commented 1 year ago

The final prototype made by @MewenLeHo is in the following closed PR https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/pull/2257 which can be reopened when the development starts. Live preview: https://deploy-preview-2257--boosted.netlify.app/docs/5.3/examples/form/

julien-deramond commented 1 year ago

Note for future selves when we'll get back to this PR. Dark mode introduced some new concepts, and this PR should probably take that into account. For example:

Screenshot 2023-10-10 at 11 06 46