Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SHS-6001: Accessibility issues in lists of people #1729

Merged
merged 12 commits into from
Feb 11, 2025

Conversation

mariannuar
Copy link
Collaborator

@mariannuar mariannuar commented Jan 28, 2025

Summary

  • Make structured card full clickable to avoid having redundant information
  • Add more context to the links inside the structured card

Need Review By (Date)

01/30

Urgency

medium

Notes

  • To avoid having redundant links, it's necessary to go to the configuration of the view and remove the Link media to parent for the Image field
  • All links inside structured card (it's the pattern being used in person lists) are going to have this structured <a href="/"><span class="visually-hidden">Emilius Aalto: </span>Website</a>, except mailto links and the title link

Steps to Test

  1. Go to /default-views/people
  2. Scroll down to Default People view - People List Link (Grouped) Display
  3. Confirm the whole card is clickable and it works and looks as expected when interacting with it.
  4. Confirm that you can interact with text inside the card without the issue of being redirect immediately to another page. (Please check this also in /default-views/news
  5. Check links inside the card (Like Personal Website, Email, etc) now have this structured <a href="/"><span class="visually-hidden">Emilius Aalto: </span>Website</a>, except mailto links and the title link

Review Tasks

Backend / Functional Validation

Code

  • Are the naming conventions following our standards?
  • Are PHP functions and variables in snake_case and not camelCase?
  • Does Drupal code follow Drupal Coding Standards?
  • Does the code have sufficient inline comments?
  • Is there anything in this code that would be hidden or hard to discover through the UI?
  • Are there any code smells?
  • Are tests provided?

Code security

General

  • Is there anything included in this PR that is not related to the problem it is trying to solve?
  • Is the approach to the problem appropriate?

Sorry, something went wrong.

@ahughes3 ahughes3 temporarily deployed to Tugboat January 28, 2025 16:58 Destroyed
@ahughes3 ahughes3 temporarily deployed to Tugboat January 28, 2025 18:45 Destroyed
@mariannuar mariannuar requested a review from cienvaras January 28, 2025 18:58
@ahughes3 ahughes3 temporarily deployed to Tugboat February 4, 2025 00:31 Destroyed
@ahughes3 ahughes3 temporarily deployed to Tugboat February 5, 2025 16:04 Destroyed
… the links inside structured card, except mailto and title links
@ahughes3 ahughes3 temporarily deployed to Tugboat February 5, 2025 16:51 Destroyed
Base automatically changed from 11.6.4-release to develop February 6, 2025 16:51
Copy link
Collaborator

@cienvaras cienvaras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mariannuar Looks good! Let's just organize the JS files a bit better:

  1. Rename linked-cards folder to cards, move structured-cards.js there
  2. Extract click and focus event handlers to a new file, add a wrapper function to assign all event handlers at once to cards
  3. Include the new file and call the wrapper function in both linked-cards.js and structured-cards.js

This will help us find to have a better structure that goes along the JS restructuring done in #1691

@cienvaras cienvaras changed the base branch from develop to 11.7.1-release February 10, 2025 18:25
@ahughes3 ahughes3 temporarily deployed to Tugboat February 10, 2025 18:32 Destroyed
@ahughes3 ahughes3 temporarily deployed to Tugboat February 10, 2025 19:28 Destroyed
@mariannuar mariannuar requested a review from cienvaras February 10, 2025 19:58
@mariannuar
Copy link
Collaborator Author

@cienvaras Ready for review again!

@ahughes3 ahughes3 temporarily deployed to Tugboat February 10, 2025 22:08 Destroyed
@ahughes3 ahughes3 temporarily deployed to Tugboat February 10, 2025 22:27 Destroyed
Copy link
Collaborator

@cienvaras cienvaras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mariannuar Looks great. There's just one small detail that we discussed in our call but forgot to add to the requested changes: let's use the is-focused class that's being added when the title is focused to match the hover styles for the whole card (I think it's only the zoom effect on the image)

…title is focused to match the hover styles for the whole card
@ahughes3 ahughes3 temporarily deployed to Tugboat February 11, 2025 15:29 Destroyed
@mariannuar
Copy link
Collaborator Author

@cienvaras Done!

@mariannuar mariannuar requested a review from cienvaras February 11, 2025 15:40
@ahughes3 ahughes3 temporarily deployed to Tugboat February 11, 2025 16:18 Destroyed
Copy link
Collaborator

@cienvaras cienvaras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mariannuar Works as expected, thanks for the fixes!

@ahughes3 Ready for you

@cienvaras cienvaras assigned ahughes3 and unassigned mariannuar Feb 11, 2025
@cienvaras cienvaras requested a review from ahughes3 February 11, 2025 16:19
Copy link
Collaborator

@ahughes3 ahughes3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ahughes3 ahughes3 assigned joegl and unassigned ahughes3 Feb 11, 2025
@ahughes3 ahughes3 requested a review from joegl February 11, 2025 18:55
@ahughes3 ahughes3 temporarily deployed to Tugboat February 11, 2025 20:49 Destroyed
@mariannuar
Copy link
Collaborator Author

@cienvaras @ahughes3 Changes to unlink the image applied to Default People views

@joegl joegl merged commit 338c444 into 11.7.1-release Feb 11, 2025
18 checks passed
@joegl joegl deleted the shs-6001--fix-links-in-structured-card branch February 11, 2025 21:22
@joegl
Copy link
Contributor

joegl commented Feb 11, 2025

@mariannuar @cienvaras @ahughes3 I merged this one but noticed Maria made a small change after the approvals.

@cienvaras
Copy link
Collaborator

Thanks @joegl, yes, that's something extra we discussed during today's demo and I forgot to add a comment to let you know. It's a small config change, so shouldn't be a problem, but I'll take a look and confirm that everything works as expected.

cc. @ahughes3 @mariannuar

@joegl
Copy link
Contributor

joegl commented Feb 11, 2025

Awesome, thanks Andres 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants