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

fix: add descriptive alt tags to listings images #1587

Merged
merged 4 commits into from
Mar 23, 2023

Conversation

KrissDrawing
Copy link
Collaborator

Pull Request Template

Issue Overview

This PR addresses #944

  • This change addresses the issue in full
  • This change addresses only certain aspects of the issue
  • This change is a dependency for another issue
  • This change has a dependency from another issue

Description

Changed listings images alt text to be more specific (to include listing name)
For listingCard (in /listings) it will read listing name and - photo, as it is not treated as Image, but link.
For images for specific listing it is treated as an Image, so there will be added - photo (number of photo) only when having multiple images (both in listing view, and after modal is opened).

How Can This Be Tested/Reviewed?

while having screen reader on, go to /listings focus on images.
do the same for listing/:id view, both for single image, and multiple image listing.
For multiple images test images inside modal (that appears after clicking).

Checklist:

  • My code follows the style guidelines of this project
  • I have added QA notes to the issue with applicable URLs
  • I have performed a self-review of my own code
  • I have reviewed the changes in a desktop view
  • I have reviewed the changes in a mobile view
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have assigned reviewers
  • I have run yarn generate:client and/or created a migration if I made backend changes that require them
  • I have exported any new pieces added to ui-components
  • My commit message(s) is/are polished, and any breaking changes are indicated in the message and are well-described
  • Commits made across packages purposefully have the same commit message/version change, else are separated into different commits

Reviewer Notes:

Steps to review a PR:

  • Read and understand the issue, and ensure the author has added QA notes
  • Review the code itself from a style point of view
  • Pull the changes down locally and test that the acceptance criteria is met
  • Also review the acceptance criteria on the Netlify deploy preview (noting that these do not yet include any backend changes made in the PR)
  • Either explicitly ask a clarifying question, request changes, or approve the PR if there are small remaining changes but the PR is otherwise good to go

On Merge:

If you have one commit and message, squash. If you need each message to be applied, rebase and merge.

@netlify
Copy link

netlify bot commented Mar 16, 2023

Deploy Preview for detroit-storybook-dev ready!

Name Link
🔨 Latest commit 4a85ed7
🔍 Latest deploy log https://app.netlify.com/sites/detroit-storybook-dev/deploys/6419c85e59c0860008ed65a6
😎 Deploy Preview https://deploy-preview-1587--detroit-storybook-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Mar 16, 2023

Deploy Preview for detroit-partners-dev ready!

Name Link
🔨 Latest commit 4a85ed7
🔍 Latest deploy log https://app.netlify.com/sites/detroit-partners-dev/deploys/6419c85e8d97ed0008dafeb9
😎 Deploy Preview https://deploy-preview-1587--detroit-partners-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Mar 16, 2023

Deploy Preview for detroit-public-dev ready!

Name Link
🔨 Latest commit 4a85ed7
🔍 Latest deploy log https://app.netlify.com/sites/detroit-public-dev/deploys/6419c85ef5980d000861db2b
😎 Deploy Preview https://deploy-preview-1587--detroit-public-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Collaborator

@ludtkemorgan ludtkemorgan left a comment

Choose a reason for hiding this comment

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

This change looks good. The images are displaying and reading the correct alt text now with appropriate photo index.

The ticket said that "image" shouldn't be in the aria description since the screen reader already says that by default. And with this change it now says "[property name] - photo 1, image" ("photo" coming from the alt text and "image" coming from the screen reader). @ColinBuyck & @sarahlazarich is that expected. Or should we switch it to do "[property name] - 1, image"

@sarahlazarich
Copy link
Collaborator

sarahlazarich commented Mar 17, 2023

Spoke with Colin and Em here, let's update to "[property name] - 1, image" @ludtkemorgan @KrissDrawing

@ColinBuyck
Copy link
Collaborator

ColinBuyck commented Mar 20, 2023

This is looking good, I'm just noticing two things: The first is that I believe the inclusion of "image" in the listings image alt name is repetitive even though it is a link. On my end, it is still reading out image but this time before the label. Are you seeing the same behavior?
Screenshot 2023-03-20 at 4 43 51 PM
The second piece is that the coming soon label on an image on the listings page seems to be overriding the image alt labeling. Therefore, any image on the listings page with this tag just reads link, coming soon. However, this is not a blocker or within the scope of this ticket so I made a follow-up issue here!

@KrissDrawing
Copy link
Collaborator Author

@ColinBuyck hmm interesting, I'm not seeing visited, link, image on my side. Will need to check if i can tweak some settings to achieve that, or maybe i'm just on different OS version (it's 12.3 for me) 🤔 Anyway I removed additional image as it seem like it should be already announced by screen reader.

Copy link
Collaborator

@ColinBuyck ColinBuyck left a comment

Choose a reason for hiding this comment

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

Thanks for making those updates! LGTM 🪂

@ludtkemorgan ludtkemorgan merged commit 83db4ac into dev Mar 23, 2023
@ludtkemorgan ludtkemorgan deleted the 944/Alt-tag-for-property-images-is-too-generic branch March 23, 2023 15:02
ludtkemorgan pushed a commit that referenced this pull request Mar 23, 2023
* fix: add descriptive alt tags to listings images

* fix: add empty value to alt text

* fix: remove redundant photo string

* fix: remove redundant image string from translations
@ludtkemorgan ludtkemorgan mentioned this pull request Mar 23, 2023
ludtkemorgan added a commit that referenced this pull request Mar 28, 2023
* feat: add user csv export (#1560)

* feat: listing export (#1548)

* feat: starting listing export

* fix: wip building listing query

* fix: csv support

* fix: adding column definitions wip

* fix: wip address query

* fix: updates to fix query

* fix: wip listing selects

* fix: reformatted testing output

* fix: completed select statements

* fix: exporter service wip

* fix: a11y features formatting

* fix: wip adding to exporter

* fix: wip lottery info formatting

* fix: wip date formatting

* fix: listings exporter service fields (95%)

* fix: complete units csv building

* fix: functioning zip download

* fix: req.user type casting

* fix: refactor to config approach

* fix: various csv bugs

* fix: debugging column values

* fix: user access array

* fix: clean up

* fix: clean up pt 2

* fix: ui content and error handling

* fix: ui content and error handling actually

* fix: cleanup + cypress test

* fix: cypress test and naming clean up

* fix: unit test draft

* fix: error handling fix

* fix: removed unused seed

* fix: functional cypress and wip unit tests

* fix: one functional unit test

* fix: functional unit tests

* fix: wip error test

* fix: error message test

* fix: wip module mocking

* fix: generateAsnyc readded to test

* fix: controller cleanup

* fix: functional success message testing

* fix: testing cleanup

* fix: further testing and comment cleanup

* fix: toast timeout

* fix: clean up formatting

* fix: column cleanup

* fix: console log cleanup

* fix: rebase cleanup

* fix: wip bug fixes

* fix: wip data bug resolutions

* fix: unit bug fixes

* fix: formatting contd

* fix: clean up

* fix: button focus issue

* fix: testing repository error

* fix: include csv exporter service in test

* fix: refined testing fix

* fix: button color correction

* fix: align sizing and export language

---------

Co-authored-by: Yazeed Loonat <[email protected]>

* fix: listings export clean up (#1590)

* fix: local import

* fix: unit tests fix

* fix: add aria label to min/max rent fields (#1582)

* fix: remove the due date question (#1584)

* 1525/user access issue (#1592)

* fix: include admin who are not partners

* fix: correct user seed

* fix: remove admin from permissions column

* fix: testing cleanup

* fix: change test location

* fix: add undefined check

* fix: add aria label to table (#1585)

* fix: add aria label to table

* fix: add aria labels to detail tables

* fix: unit labeling on detailed page

* fix: add aria-label to grouped table

* fix: add descriptive alt tags to listings images (#1587)

* fix: add descriptive alt tags to listings images

* fix: add empty value to alt text

* fix: remove redundant photo string

* fix: remove redundant image string from translations

* fix: change min/max rent inputs from number to text with only numbers (#1599)

* fix: resolve bugs from bash (#1597)

* fix: resolve bugs from bash

* fix: paper app helper

* fix: refine helper

* fix: user export fixes (#1600)

* fix: user export fixes

* fix: fix tests

* fix: add cypress downloads to gitignore file

* fix: release scrub (#1604)

* fix: align csv error messages

* fix: timezone temporary approach

* fix: align application export

* fix: formatting case consistency

* fix: missing UTC

* feat: focus title on modal open (#1558)

* feat: focus title on modal open

* feat: bring back id to h1 in modal header

* fix: add a11y statement (#1601)

* fix: added english a11y statement

* fix: formatting feedback

* fix: spanish added

* fix: add ar and bn

* fix: remove unused div and styling

---------

Co-authored-by: ColinBuyck <[email protected]>
Co-authored-by: Yazeed Loonat <[email protected]>
Co-authored-by: Krzysztof Zięcina <[email protected]>
Co-authored-by: Emily Jablonski <[email protected]>
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.

4 participants