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


##########
superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Header/Header.test.tsx:
##########
@@ -53,3 +53,21 @@ test('should toggle', () => {
   userEvent.click(expandBtn);
   expect(mockedProps.toggleFiltersBar).toHaveBeenCalled();
 });
+
+test('collapse button should have aria-expanded attribute', () => {
+  const mockedProps = createProps();
+  render(<Header {...mockedProps} />, { useRedux: true });
+  const collapseBtn = screen.getByRole('button', {
+    name: 'vertical-align',
+  });
+  expect(collapseBtn).toHaveAttribute('aria-expanded', 'true');
+});
+
+test('collapse button should have aria-label for accessibility', () => {
+  const mockedProps = createProps();
+  render(<Header {...mockedProps} />, { useRedux: true });
+  const collapseBtn = screen.getByRole('button', {
+    name: 'vertical-align',

Review Comment:
   Addressed in 7a006443 — switched test selectors from 'vertical-align' to 
'Collapse filters' to match the new aria-label. Resolving — thanks for the 
catch.



##########
superset-frontend/src/dashboard/components/Header/index.tsx:
##########
@@ -757,6 +757,7 @@ const Header = (): JSX.Element => {
                 className="action-button"
                 css={editButtonStyle}
                 aria-label={t('Edit dashboard')}
+                aria-pressed={editMode}

Review Comment:
   Addressed in aabe2d99 — removed aria-pressed from the non-toggling 'Edit 
dashboard' button since it unmounts when entering edit mode rather than 
persisting as a true toggle. 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