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

Feature: --link with title attribute for accessability #264

Open
inetbiz opened this issue Sep 19, 2021 · 5 comments
Open

Feature: --link with title attribute for accessability #264

inetbiz opened this issue Sep 19, 2021 · 5 comments

Comments

@inetbiz
Copy link

inetbiz commented Sep 19, 2021

read https://www.deque.com/blog/text-links-practices-screen-readers/
a href's should at LEAST contain a title="" attribute for screen readers.

Your documentation is here https://rbuchberger.github.io/jekyll_picture_tag/users/liquid_tag/argument_reference/link.html

Proposed

{% picture [preset] [image] --alt {{post.title}} --link {{post.url}} "[whatever one wants to put about the link]" %}
// -- link [URL] "[title]"
@rbuchberger
Copy link
Owner

You can accomplish this with --a title="my title", though it's a bit cumbersome.

What if we just took the --alt argument and made it the title? Or make a --title flag which works the same way? Or some combination of both; use --title if present, otherwise use alt.

@inetbiz
Copy link
Author

inetbiz commented Sep 19, 2021

You can accomplish this with --a title="my title", though it's a bit cumbersome.

What if we just took the --alt argument and made it the title? Or make a --title flag which works the same way? Or some combination of both; use --title if present, otherwise use alt.

@rbuchberger The alt describes the photo. I'll try the --a title="~"

@inetbiz
Copy link
Author

inetbiz commented Sep 20, 2021

You can accomplish this with --a title="my title", though it's a bit cumbersome.

Update https://rbuchberger.github.io/jekyll_picture_tag/users/liquid_tag/argument_reference/link.html or somewhere else? with title attribute on link?

@rbuchberger
Copy link
Owner

rbuchberger commented Sep 21, 2021

The --a flag allows you to add arbitrary HTML attributes to the anchor tag.

I think --title is the way to go; it's the simplest to parse and it's in line with the existing API. I'll mark it as a feature request, might be a good first issue if anyone wants to contribute. You can look at how the --alt flag works as a guide.

We just had a kid and I'm working full time, so I'm real busy these days. If nobody else writes it I'll get to it eventually, but I can't promise a timeline.

@inetbiz
Copy link
Author

inetbiz commented Sep 21, 2021

@rbuchberger worked well. I just suggest the documentation at https://rbuchberger.github.io/jekyll_picture_tag/users/liquid_tag/argument_reference/link.html should mention that.

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

No branches or pull requests

2 participants