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

[Topic RL][Feature Request]: New focus handling behaviour #8319

Open ilhan007 opened 8 months ago

ilhan007 commented 8 months ago

Feature Request Description

According to the latest visual and interaction designs, the focus should behave like this:

Input elements remain unchanged - they always show focus as additional attention is needed.

To be clarified:

Example implementation

8253

Proposed Solution

A pure CSS solution is possible by using :focus-visible which will match only when focus is received via keyboard. This is sufficient for mobile.

For desktop, the :focusselector should be used with an additional attribute on the host manually set by the component. Use :focus-within if a nested component can receive focus, such as a button with avatar, the avatar will get the focus when touched.

The manual attributes [focused] and setting them via focusin and focusout handlers is discouraged and should be clarified additionally.

Proposed Alternatives

No response

Organization

UI5

Additional Context

No response

Priority

None

Privacy Policy

ilhan007 commented 8 months ago

Related to: https://github.com/SAP/ui5-webcomponents/issues/8250