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

Update Photo.tpl.php #2440

Closed
wants to merge 1 commit into from
Closed

Update Photo.tpl.php #2440

wants to merge 1 commit into from

Conversation

jgmac1106
Copy link
Contributor

trying to echo the new variable I created for alt text. I did not know I should remove the html sanitizing or keep it so people can not use tags in the alt text field.

Here's what I fixed or added:

I added a form field for alt text to the photo page. It still needs to be added to edit.php but I wanted to check if I was on the correct path first.

I then named the variable alt

Then in Photo.tpl.php

I switched GetTitle to Getalt

Here's why I did it:

100% probably did this incorrect but wanted to get this started as this is a critical bug for me. I have blind students in class and will not be able to use photo post types until the alt text is resolved.

Alt text is different than the title of a photo or a post.

Checklist:

I do not meet the qualities of the checklist. My apologies

  • [ X] This pull request addresses a single issue
  • If this code includes interface changes, I've included screenshots in this Pull Request thread
  • I've adhered to Known's style guide (these codesniffer rules might help!)
  • My git branch is named in a descriptive way - i.e., yourname-summary-of-issue
  • I've tested my code in-browser
  • My code contains descriptive comments
  • I've added tests where applicable, and...
  • I can run the unit tests successfully.

trying to echo the new variable I created for alt text. I did not know I should remove the html sanitizing or keep it so people can not use tags in the alt text field.
@johanbove
Copy link
Contributor

I made the exact same change on my instance of Known to get a better Lighthouse score :-)

@mapkyca
Copy link
Member

mapkyca commented Jul 1, 2019

My €0.02 on this (and the reason why it's not in there in the first place) is that I'm keen not to clutter the interface too much, so maybe it should be an optional "click to add alt text" sort of deal.

The other complication is that you'd want to be able to add individual alt text per image.

@mapkyca
Copy link
Member

mapkyca commented Sep 4, 2019

Closing pending future development on the Photos plugin

@mapkyca mapkyca closed this Sep 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants