Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Timeline]: [No text alternative for the icons] #9806

Open
1 task done
durgaprasad1995 opened this issue Sep 3, 2024 · 12 comments · May be fixed by #10277
Open
1 task done

[Timeline]: [No text alternative for the icons] #9806

durgaprasad1995 opened this issue Sep 3, 2024 · 12 comments · May be fixed by #10277

Comments

@durgaprasad1995
Copy link

Describe the bug

Accessibility Issue.

The information conveyed through color (green/red) for the icons is unavailable in alternate (accessible) text.

Expected Behavior:

The information conveyed through color for each & every non-text element must have an (accessible) text alternative conveying similar information.

Color or color differences are an often-used asset to convey information i.e. "errors shown in red" or "required fields are red" or "already visited links are purple". However, if color is the only characteristics indicating that information it might be not accessible for people with color blindness. Thus, an additional indicator is needed.

here you can plug and play https://sap.github.io/ui5-webcomponents-react/v2/?path=/story/data-display-timeline--default

Isolated Example

https://sap.github.io/ui5-webcomponents-react/v2/?path=/story/data-display-timeline--default

Reproduction steps

  1. you can open any voice assistant (Jaws,NVDA etc)
  2. go to this timeline component(https://sap.github.io/ui5-webcomponents-react/v2/?path=/story/data-display-timeline--default) in UI 5 check that icon is announcing to the user.

Expected Behaviour

The information conveyed through color for each & every non-text element must have an (accessible) text alternative conveying similar information.

Color or color differences are an often-used asset to convey information i.e. "errors shown in red" or "required fields are red" or "already visited links are purple". However, if color is the only characteristics indicating that information it might be not accessible for people with color blindness. Thus, an additional indicator is needed.

Screenshots or Videos

image

UI5 Web Components for React Version

1.23.1

UI5 Web Components Version

1.23.1

Browser

Chrome

Operating System

windows

Additional Context

No response

Relevant log output

No response

Organization

SAP

Declaration

  • I’m not disclosing any internal or sensitive information.
@durgaprasad1995 durgaprasad1995 added the bug This issue is a bug in the code label Sep 3, 2024
@Lukas742
Copy link
Collaborator

Lukas742 commented Sep 4, 2024

Thanks for reporting! I'll forward this issue to our UI5 Web Components Colleagues as the affected component is developed in their repository.

@Lukas742 Lukas742 transferred this issue from SAP/ui5-webcomponents-react Sep 4, 2024
@kskondov kskondov self-assigned this Sep 4, 2024
@kskondov
Copy link
Contributor

kskondov commented Sep 4, 2024

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

Please take a look at this issue/feature request for additional indicators (other than color) for icons in the timeline component.

Best Regards,
Konstantin

@unazko
Copy link
Contributor

unazko commented Sep 4, 2024

Hello @durgaprasad1995,

How are those icons from the provided screenshot colored?
Could you edit the sample, so the icons are colored.

In the openui5 project there is a property called status for the timeline item. Form there an application developer could set for example an "Error", "Information", "Success" status, which has accessibility semantics.
There is no such property for the ui5-timeline-item component though.

Best regards,
Boyan

@unazko unazko added author action feature request and removed bug This issue is a bug in the code Medium Prio labels Sep 4, 2024
@durgaprasad1995
Copy link
Author

HI @unazko

Here is the information on how our implementation in React using UI 5 Web component

import {
Timeline,
TimelineItem,
TimelineLayout,
TitleLevel,
} from "@ui5/webcomponents-react";

{justificationList?.map( /* istanbul ignore next */ (list) => (
{list?.justification}
) )}

Our accessibility team expects that the icon should be announced so that users can understand

@durgaprasad1995
Copy link
Author

@unazko There is no update on this ticket

@unazko
Copy link
Contributor

unazko commented Sep 12, 2024

Hi @durgaprasad1995,

Please checkout the following sample: https://stackblitz.com/edit/github-pwfft8-hktoie?file=index.html
and edit if possible.
I suspect that in the provided screenshot the icons are colored via CSS.

If that is the case then this would be a feature request for a state property, which would give the application developers the possibility to change the color and accessibility semantics of those icons.

@durgaprasad1995
Copy link
Author

durgaprasad1995 commented Sep 12, 2024

Hi @unazko You are correct we are using the CSS to add the color

Here is the code for that color adding
useEffect(() => { const justificationTimelineActiveList = Array.from( document.getElementsByClassName( "justification-timeline-list-active" ) as HTMLCollectionOf<HTMLElement> ); justificationTimelineActiveList?.forEach((element) => { const [list] = ( element?.shadowRoot?.childNodes[1] as HTMLElement )?.getElementsByClassName("ui5-tli-icon"); list?.setAttribute("style", "color:#187D08 !important;"); }); const justificationTimelineInactiveList = Array.from( document.getElementsByClassName( "justification-timeline-list-inactive" ) as HTMLCollectionOf<HTMLElement> ); justificationTimelineInactiveList?.forEach((element) => { const [list] = ( element?.shadowRoot?.childNodes[1] as HTMLElement )?.getElementsByClassName("ui5-tli-icon"); list?.setAttribute("style", "color:#BB0000 !important;"); }); });

Here is the code for the Timeline Element

<Timeline layout={TimelineLayout.Vertical} style={theme.uiFullWidth}> {justificationList?.map( /* istanbul ignore next */ (list) => ( <TimelineItem key={list?.id} icon="icon-activity-items" name={concatThreeValueFunction( list?.createdBy?.firstName, list?.createdBy?.lastName, list?.createdBy?.uniqueName )} subtitleText={replaceEmptyDateWithHyphen( list?.createdTimestamp )} className={ list?.isActivationJustificationText ? "justification-timeline-list-active" : "justification-timeline-list-inactive" } style={{ wordBreak: "break-all", }} > <div>{list?.justification}</div> </TimelineItem> ) )} </Timeline>

@unazko
Copy link
Contributor

unazko commented Sep 12, 2024

Hi @durgaprasad1995,

We already have a design according to which we could provide semantic meaning to the ui5-timeline-item's.
According to the design we'll have announcement for a predefined states of the items ("Error", "Information", "Success" and "Warning").

The provided colors from the code snippet are:

  • #187D08 corresponds to green ("Success" semantics)
  • #BB0000 corresponds to red ("Error" semantics)

I guess custom colors aren't part of your requirement and we could use the already existing design.
We need to provide a new property like the status property in the openui5 timeline item control.
This property will be used to set one of four predefined states indicating an icon color and accessibility semantics.

Moving the request for planning.

@durgaprasad1995
Copy link
Author

Okay Thanks a lot Once it is updated let me know the version of it

@durgaprasad1995
Copy link
Author

Hi @unazko

Ques:-We already have a design according to which we could provide semantic meaning to the ui5-timeline-item's.
Ans: I don't see the property to add semantic meaning to the ui5-timeline-item's. can you please help us

https://sap.github.io/ui5-webcomponents-react/v2/?path=/docs/data-display-timeline--docs

@durgaprasad1995
Copy link
Author

Hi @unazko any update

@DMihaylova
Copy link

Hi @durgaprasad1995,

@unazko meant that it's expected to have a design for that since it's implemented in Classing UI5: https://ui5.sap.com/#/api/sap.suite.ui.commons.TimelineItem (check "status" property).
However, I'm not able to find it at the moment and I'm in sync with the corresponding designers.

Thanks for your understanding,
Diana

@unazko unazko assigned DMihaylova and unassigned unazko Jan 6, 2025
@hinzzx hinzzx linked a pull request Jan 6, 2025 that will close this issue
@DMihaylova DMihaylova moved this from Approved to In Progress in Planning - Topic B Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

5 participants