From 28dbc3cabbabfb3b7df3fdca7f352a2faf8f2bc7 Mon Sep 17 00:00:00 2001 From: Saurabh Sharma Date: Mon, 3 Feb 2025 00:20:01 +0530 Subject: [PATCH] [MM-61598]: Fix ARIA roles, states, and properties are valid in user profile image and @user buttons (#29692) * [MA-26]: Fix ARIA roles, states, and properties are valid in user profile image and @user buttons * [MA-26]: Remove irrelevant e2e tests * [MA-26]: Remove nested interactive elements * [MA-26]: Updated mention-link styles * Minor change --------- Co-authored-by: ayush-chauhan233 --- .../accessibility_keyboard_usability_spec.js | 2 - .../accessibility/accessibility_post_spec.js | 2 +- .../admin_user_card.test.tsx.snap | 116 ++++----- .../system_user_detail.test.tsx.snap | 174 ++++++------- .../__snapshots__/at_mention.test.tsx.snap | 63 ++--- .../src/components/at_mention/at_mention.tsx | 9 +- .../__snapshots__/panel_body.test.tsx.snap | 244 ++++++++++-------- .../src/components/post/post_component.tsx | 1 - .../profile_picture.test.tsx.snap | 27 +- .../src/components/profile_picture/index.tsx | 34 +-- .../src/sass/components/_mentions.scss | 9 + 11 files changed, 333 insertions(+), 348 deletions(-) diff --git a/e2e-tests/cypress/tests/integration/channels/accessibility/accessibility_keyboard_usability_spec.js b/e2e-tests/cypress/tests/integration/channels/accessibility/accessibility_keyboard_usability_spec.js index 9877e57b38..f33868da7a 100644 --- a/e2e-tests/cypress/tests/integration/channels/accessibility/accessibility_keyboard_usability_spec.js +++ b/e2e-tests/cypress/tests/integration/channels/accessibility/accessibility_keyboard_usability_spec.js @@ -156,8 +156,6 @@ describe('Verify Accessibility keyboard usability across different regions in th cy.get(region).should('have.attr', 'role', 'application'); }); cy.get('.search__form').should('have.attr', 'role', 'search'); - cy.get(`#post_${postId}`).children('.post__content').eq(0).should('have.attr', 'role', 'application'); - cy.get(`#rhsPost_${postId}`).children('.post__content').eq(0).should('have.attr', 'role', 'application'); }); }); }); diff --git a/e2e-tests/cypress/tests/integration/channels/accessibility/accessibility_post_spec.js b/e2e-tests/cypress/tests/integration/channels/accessibility/accessibility_post_spec.js index b71ed0ec78..861ea3c04e 100644 --- a/e2e-tests/cypress/tests/integration/channels/accessibility/accessibility_post_spec.js +++ b/e2e-tests/cypress/tests/integration/channels/accessibility/accessibility_post_spec.js @@ -162,7 +162,7 @@ describe('Verify Accessibility Support in Post', () => { cy.getLastPostId().then((postId) => { cy.get(`#post_${postId}`).within(() => { // * Verify focus is on profile image - cy.get('.status-wrapper button').first().should('be.focused'); + cy.get('button.status-wrapper').first().should('be.focused'); cy.focused().tab(); // * Verify focus is on the username diff --git a/webapp/channels/src/components/admin_console/admin_user_card/__snapshots__/admin_user_card.test.tsx.snap b/webapp/channels/src/components/admin_console/admin_user_card/__snapshots__/admin_user_card.test.tsx.snap index f8b543c9e9..b7d10df6a7 100644 --- a/webapp/channels/src/components/admin_console/admin_user_card/__snapshots__/admin_user_card.test.tsx.snap +++ b/webapp/channels/src/components/admin_console/admin_user_card/__snapshots__/admin_user_card.test.tsx.snap @@ -8,26 +8,23 @@ exports[`components/admin_console/admin_user_card/admin_user_card should match d
- + user profile image + +