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

add title to truncated links #1505

Merged
merged 12 commits into from
Sep 13, 2024
Merged

add title to truncated links #1505

merged 12 commits into from
Sep 13, 2024

Conversation

RabiaSajjad
Copy link
Member

No description provided.

ckanext/canada/templates/package/base.html Outdated Show resolved Hide resolved
ckanext/canada/helpers.py Outdated Show resolved Hide resolved
ckanext/canada/templates/admin/trash.html Show resolved Hide resolved
ckanext/canada/templates/package/resource_read.html Outdated Show resolved Hide resolved
@@ -31,6 +31,11 @@
{% endif %}
{% endblock %}

{% block breadcrumb_content %}
{{ super.super() }}
<li class="active"><a href="" title="{{ h.resource_display_name(res) }}">{{ h.resource_display_name(res)|truncate(80) }}</a></li>
Copy link
Member

Choose a reason for hiding this comment

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

AFAIK <a> tags without an href are bad for a11y. Are we allowed to add a title to another type of tag?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think you can do javascript void into the href to fix the a11y complaints.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also put tabindex="-1" to prevent tabbing

@RabiaSajjad RabiaSajjad merged commit 1023f83 into master Sep 13, 2024
4 checks passed
@RabiaSajjad RabiaSajjad deleted the links-title branch September 13, 2024 15:30
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