Aitema-gmbh commented on code in PR #39233:
URL: https://github.com/apache/superset/pull/39233#discussion_r3232390904


##########
superset-frontend/src/explore/components/controls/ColorSchemeControl/ColorSchemeLabel.tsx:
##########
@@ -94,6 +96,8 @@ export default function ColorSchemeLabel(props: 
ColorSchemeLabelProps) {
           justify-content: flex-start;
         `}
         data-test={id}
+        aria-label={t('Color scheme: %s', label)}
+        role="option"

Review Comment:
   Addressed in ac869591 — removed the invalid role="option" on the inner span; 
the Select wrapper provides listbox semantics and the aria-label remains for 
the accessible name. Resolving — thanks for the catch.



##########
superset-frontend/src/explore/components/controls/ColorSchemeControl/ColorSchemeLabel.test.tsx:
##########
@@ -56,3 +56,19 @@ test('should render the colors', () => {
   const allColors = screen.getAllByTestId('color');
   expect(allColors).toHaveLength(12);
 });
+
+test('should render aria-label with scheme name on the swatch container', () 
=> {
+  setup();
+  const option = screen.getByRole('option', {
+    name: 'Color scheme: Superset Colors',
+  });
+  expect(option).toBeInTheDocument();

Review Comment:
   Addressed in 259216c8 — switched the test to getByLabelText('Color scheme: 
Superset Colors') since role="option" was removed in ac869591 (invalid outside 
a listbox). Resolving — thanks for the catch.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to