question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[ui5-li] Unable to set accessibleRole attribute for resulting ui5-icon when using icon property

See original GitHub issue

Bug Description

Hi Team,

When icon property for StandardListItem is set, there is no option to set the accessibleRole (https://github.com/SAP/ui5-webcomponents/pull/4548) property for the resulting ui5-icon.

When we specify action-settings as the value for the icon parameter, the resulting svg image for this list item has a default img role set to it.

<ui5-icon part="icon" class="ui5-li-icon" name="action-settings" ui5-icon="">
<svg class="ui5-icon-root" viewBox="0 0 512 512" focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" tabindex="-1" role="img" aria-label="Settings">...</svg>
</ui5-icon>

When a screen reader is used to navigate the application, the settings list item is announced twice as “Settings settings”.

Expected Behavior

accessibleRole should be a config option on the ui5-li, that can be passed down to ui5-icon when the icon property for StandardListItem is set. Labels should be announced only once when using screen reader to navigate within the application.

Steps to Reproduce

  1. Go to https://codesandbox.io/s/wonderful-burnell-m62vm?file=/index.html
  2. Using screen reader, navigate through the screen

Context

  • UI5 Web Components version: 1.1.0
  • OS/Platform: All
  • Browser: All
  • Affected component: ui5-li

Priority

  • Low
  • Medium
  • High
  • Very High

The priority indicates the severity of the issue. To set the appropriate priority consider the following criteria:

  • Breaks entire application or system - High or Very High
  • Accessibility issue - Medium or High
  • Functional issue - Medium or High
  • Visual issue - Low or Medium

Note: The priority might be re-evaluated by the issue processor.

Stakeholder Info (if applicable)

  • Organization: SF
  • Bussiness impact: Medium

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
ilhan007commented, Feb 2, 2022

Hello @dkris from our offline discussions I know that you need to control/define the accessibleRole of the internally rendered ui5-icon, rendered inside the StandardListItem. Is that all? Please comment if I miss something. Meanwhile, I will forward your request to the team.

Hello @SAP/ui5-webcomponents-topic-p it seems that our SF colleagues, that recently requested an API for the ui5-icon, are using the StandardListItem, where the icon is not accessible directly and they need to control the accessibleRole of the ui5-icon, rendered inside the StandardListItem. We either need to expose a slot, or property. similar to the FCL, ShellBar, allowing to set aria attrs to the internals.

0reactions
terezamchcommented, May 23, 2022

Hello @dkris ,

As the last mention PR is already merged and the issue is fixed, I am closing the GitHub issue.

Best regards, Tereza

Read more comments on GitHub >

github_iconTop Results From Across the Web

Icon and Icon Pool - Documentation - Demo Kit - SAPUI5 SDK
The sap-icon:// protocol supports the use of icons in your application based on the icon font concept, which uses an embedded font instead...
Read more >
Icon - UI5 Web Components - SAP
1. Get familiar with the icons collections. · 2. After exploring the icons collections, add one or more of the packages as dependencies...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found