SAP / ui5-webcomponents

UI5 Web Components - the enterprise-flavored sugar on top of native APIs! Build SAP Fiori user interfaces with the technology of your choice.
https://sap.github.io/ui5-webcomponents/
Apache License 2.0
1.54k stars 265 forks source link

[DateRangePicker | React | localization | i18n | typescript]: Placeholder value getting truncated #9861

Closed durgaprasad1995 closed 1 month ago

durgaprasad1995 commented 1 month ago

Bug Description

Place holder is truncated when we apply standard text spacing as per accessibility. (https://www.w3.org/WAI/WCAG21/Understanding/text-spacing.html)

ACC-283 - Text Spacing Text has to adapt to spacing settings adjusted by the user without loss of content or functionality:

Line height (line spacing) to at least 1.5 times the font size Spacing following paragraphs to at least 2 times the font size Letter spacing (tracking) to at least 0.12 times the font size Word spacing to at least 0.16 times the font size if the used technology supports the named text style properties, and if the UI does not have a fixed size content layout area that is essential to the information being conveyed. image

Observed Behavior:

On accessing application using text spacing, the placeholder values of the input fields ‘Publication date’, ‘Start Date’ and ‘End Date’ are getting truncated.

Note: The above reported Issue persists for all such UI throughout the application. Hence it should be corrected for all the occurrences.*

Expected Behavior:

All the UIs should adapt to applied text spacing settings without loss of information or functionality.

The ability to increase spacing between lines, words, letters, and paragraphs, or any combination of these, may assist a user with effectively reading text. After adjusting spacing, text should fits into its containing box without overlapping other boxes or content being cut off.

It is recommended that the UI should have a flexible and clean implementation of measurements basing on em/rem and incorporating the line height. This way it adapts also to the user's space settings per style sheet.

image

Screenshot 2024-09-13 104631

Affected Component

DateRangePicker

Expected Behaviour

All the UIs should adapt to applied text spacing settings without loss of information or functionality.

The ability to increase spacing between lines, words, letters, and paragraphs, or any combination of these, may assist a user with effectively reading text. After adjusting spacing, text should fits into its containing box without overlapping other boxes or content being cut off.

It is recommended that the UI should have a flexible and clean implementation of measurements basing on em/rem and incorporating the line height. This way it adapts also to the user's space settings per style sheet.

Isolated Example

https://sap.github.io/ui5-webcomponents-react/v2/?path=/story/inputs-daterangepicker--default&args=formatPattern:;waitForDefine:!true

Steps to Reproduce

1.Open URL(https://sap.github.io/ui5-webcomponents-react/v2/?path=/story/inputs-daterangepicker--default&args=formatPattern:;waitForDefine:!true) 2.Enable ‘Stylus’ extension 3.Add the standard Accessibilty text spacing in Stylus

Log Output, Stack Trace or Screenshots

No response

Priority

None

UI5 Web Components Version

1.23.0

Browser

Chrome

Operating System

Windows

Additional Context

No response

Organization

SAP

Declaration

didip1000 commented 1 month ago

Hey @SAP/ui5-webcomponents-topic-b,

This is part of the project-wide truncation issues. I believe the recommended approach is to have the app developpers handle the case with the wide text, but this needs to be confirmed.

Thanks, Diana P

didip1000 commented 1 month ago

Hey @durgaprasad1995,

We've consulted with our design team, and they confirmed that the placeholder does cut off the end date format. However, since it's the same format as the start date, the user could easily predict the end date format. Additionally, application developers could use the display format in order to generate a tooltip or some other label.

In cases where the start and end dates are shown but the end date is cut off, the alternative is to open the date picker, where both dates are fully visible and selected.

Best Regards, Diana P.