carbon icon indicating copy to clipboard operation
carbon copied to clipboard

Placeholder consistency in the search component.

Open DavidBouffort opened this issue 1 year ago • 4 comments

Desired behaviour

Use the same design for the placeholder Capture d’écran 2023-08-04 à 11 12 58

Current behaviour

The style of the placeholder is different.

Suggested Solution

If a placeholder cannot be used due to accessibility requirements, how can we clearly communicate what input is expected? In some situations, having a designated area could prove beneficial. To achieve this, using a more prominent text hue would suffice.

CodeSandbox or Storybook URL

No response

Anything else we should know?

No response

Confidentiality

  • [X] I confirm there is no confidential or commercially sensitive information included.

DavidBouffort avatar Aug 04 '23 09:08 DavidBouffort

Hi @DavidBouffort would you be able to provide some more information on this please? Would you like search to have some sort of hint text above? Similar to what you can do on components like Password or Select?

tomdavies73 avatar Aug 08 '23 13:08 tomdavies73

Luke has requested that a ticket be opened for this matter regarding the placeholder UI. It is important to maintain consistency by utilizing a uniform look and feel. According to the accessibility team, the use of placeholders is not recommended as they may not be accessible. Nevertheless, providing descriptive text within a field can be helpful for indicating what actions or information are required. We have this need for dropdown components, lookup and search.

DavidBouffort avatar Aug 08 '23 16:08 DavidBouffort

Hi @DavidBouffort 👋🏼 Looking at the Design System docs, it seems two variants of the component are supported, one which has the search button with a label: Screenshot 2023-08-15 at 15 03 07

and the other with a search button without a label: Screenshot 2023-08-15 at 15 02 53

I agree having a label on the search button itself is preferable (over using placeholder text inside the input box) for accessibility reasons. @ljemmo should the placeholder continue to be supported within DS and Carbon for this reason?

@DavidBouffort it seems we don't support adding a label onto the search button in Carbon which DS clearly does, so we will add a ticket to address this.

Parsium avatar Aug 15 '23 14:08 Parsium

FE-6181 - for the text label issue

Parsium avatar Aug 15 '23 14:08 Parsium