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

Added alt attribute to avatar's img tag #2269

Merged
merged 2 commits into from
Aug 25, 2020

Conversation

smartclash
Copy link
Contributor

@smartclash smartclash commented Aug 20, 2020

Fixes #2256

Changes proposed in this pull request:

Adds an alt attribute in the img tag and value is set to the author's username. Improves SEO and makes site more accessible.

Screenshot

Screenshot from 2020-08-21 01-37-21

Confirmed

  • Frontend changes: tested on a local Flarum installation.
  • Backend changes: tests are green (run composer test).

@askvortsov1
Copy link
Member

askvortsov1 commented Aug 21, 2020

Even though we have the 2 approvals needed for merge, let's hold off merging this for a bit until we can have a bit more discussion in #2256

@smartclash
Copy link
Contributor Author

smartclash commented Aug 21, 2020

Sure. I thought of doing something like alt={username + " 's avatar"} but didn't do that because I realized flarum supports localization.

@smartclash
Copy link
Contributor Author

I've updated this PR. As per the discussion at #2256, alt is now empty.

@askvortsov1 @tankerkiller125

@askvortsov1 askvortsov1 merged commit 97186e6 into flarum:master Aug 25, 2020
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.

"alt" attributes for avatars
3 participants