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.58k stars 268 forks source link

[Bug][SF][1.29.0][List][A11y][Expected Fixed Time: ASAP] The status violates the contrast demand when hovering on the list in high contrast mode #9869

Open wilson-xu-sap opened 2 months ago

wilson-xu-sap commented 2 months ago

Describe the bug

The status violates the contrast demand when hovering on the list in HCB mode.

code example

import React, { useCallback, useMemo } from 'react';

import { List, StandardListItem } from '@ui5/webcomponents-react';
function App() {
  const data = [
    {
      id: 1,
      link: 'www.google.com',
      name: 'Notebook Basic',
      price: '956EUR',
      dimension: '30 x 18 x 3cm',
    },
    {
      id: 2,
      link: 'www.google.com',
      name: 'Notebook Basic',
      price: '956EUR',
      dimension: '30 x 18 x 3cm',
    },
    {
      id: 3,
      link: 'www.google.com',
      name: 'Notebook Basic',
      price: '956EUR',
      dimension: '30 x 18 x 3cm',
    },
    {
      id: 4,
      link: 'www.google.com',
      name: 'Notebook Basic',
      price: '956EUR',
      dimension: '30 x 18 x 3cm',
    },
    {
      id: 5,
      link: 'www.google.com',
      name: 'Notebook Basic',
      price: '956EUR',
      dimension: '30 x 18 x 3cm',
    },
    {
      id: 6,
      link: 'www.google.com',
      name: 'Notebook Basic',
      price: '956EUR',
      dimension: '30 x 18 x 3cm',
    },
    {
      id: 7,
      link: 'www.google.com',
      name: 'Notebook Basic',
      price: '956EUR',
      dimension: '30 x 18 x 3cm',
    },
    {
      id: 8,
      link: 'www.google.com',
      name: 'Notebook Basic',
      price: '956EUR',
      dimension: '30 x 18 x 3cm',
    },
    {
      id: 9,
      link: 'www.google.com',
      name: 'Notebook Basic',
      price: '956EUR',
      dimension: '30 x 18 x 3cm',
    },
    {
      id: 10,
      link: 'www.google.com',
      name: 'Notebook Basic',
      price: '956EUR',
      dimension: '30 x 18 x 3cm',
    },
    {
      id: 11,
      link: 'www.google.com',
      name: 'Notebook Basic',
      price: '956EUR',
      dimension: '30 x 18 x 3cm',
    },
    {
      id: 1,
      link: 'www.google.com',
      name: 'Notebook Basic',
      price: '956EUR',
      dimension: '30 x 18 x 3cm',
    },
    {
      id: 2,
      link: 'www.google.com',
      name: 'Notebook Basic',
      price: '956EUR',
      dimension: '30 x 18 x 3cm',
    },
    {
      id: 3,
      link: 'www.google.com',
      name: 'Notebook Basic',
      price: '956EUR',
      dimension: '30 x 18 x 3cm',
    },
    {
      id: 4,
      link: 'www.google.com',
      name: 'Notebook Basic',
      price: '956EUR',
      dimension: '30 x 18 x 3cm',
    },
    {
      id: 5,
      link: 'www.google.com',
      name: 'Notebook Basic',
      price: '956EUR',
      dimension: '30 x 18 x 3cm',
    },
    {
      id: 6,
      link: 'www.google.com',
      name: 'Notebook Basic',
      price: '956EUR',
      dimension: '30 x 18 x 3cm',
    },
    {
      id: 7,
      link: 'www.google.com',
      name: 'Notebook Basic',
      price: '956EUR',
      dimension: '30 x 18 x 3cm',
    },
    {
      id: 8,
      link: 'www.google.com',
      name: 'Notebook Basic',
      price: '956EUR',
      dimension: '30 x 18 x 3cm',
    },
    {
      id: 9,
      link: 'www.google.com',
      name: 'Notebook Basic',
      price: '956EUR',
      dimension: '30 x 18 x 3cm',
    },
    {
      id: 10,
      link: 'www.google.com',
      name: 'Notebook Basic',
      price: '956EUR',
      dimension: '30 x 18 x 3cm',
    },
    {
      id: 11,
      link: 'www.google.com',
      name: 'Notebook Basic',
      price: '956EUR',
      dimension: '30 x 18 x 3cm',
    },
    {
      id: 1,
      link: 'www.google.com',
      name: 'Notebook Basic',
      price: '956EUR',
      dimension: '30 x 18 x 3cm',
    },
    {
      id: 2,
      link: 'www.google.com',
      name: 'Notebook Basic',
      price: '956EUR',
      dimension: '30 x 18 x 3cm',
    },
    {
      id: 3,
      link: 'www.google.com',
      name: 'Notebook Basic',
      price: '956EUR',
      dimension: '30 x 18 x 3cm',
    },
  ];
  return (
    <>
      <List growing="None" headerText="List with ListItemStandard">
        {data.map((x) => {
          return (
            <StandardListItem
              additionalText="www"
              additionalTextState="Warning"
            ></StandardListItem>
          );
        })}
      </List>
    </>
  );
}

export default App;

Isolated Example

https://stackblitz.com/edit/github-xbtmwe-zgqwey?file=src%2FApp.tsx,src%2Fmain.tsx,node_modules%2F%40ui5%2Fwebcomponents-react%2Fdist%2Fcomponents%2FThemeProvider%2Findex.d.ts

Reproduction steps

  1. use HCB mode
  2. hover on the list item
  3. use CCA to test.

Expected Behaviour

No violation

Screenshots or Videos

image

UI5 Web Components for React Version

1.29.0

UI5 Web Components Version

1.24.0

Browser

Chrome

Operating System

No response

Additional Context

No response

Relevant log output

No response

Organization

SF

Declaration

wilson-xu-sap commented 2 months ago

BTW, if we use object status on custom list item, it shares the same issue.

wilson-xu-sap commented 2 months ago

BTW, if we use object status on custom list item, it shares the same issue.

MarcusNotheis commented 2 months ago

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

IlianaB commented 2 months ago

Hello @ui5-webcomponents-topic-p I am forwarding this issue to you, because the contrast ration between the color of the additionalText in warning state and the color of the background of the list item when hovering in HCB mode is violated. Maybe this should also be discussed with design team.

Regards, Iliana