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: Added sr-only class to icon only links #1727

Merged
merged 5 commits into from
Nov 18, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions flask_appbuilder/templates/appbuilder/general/lib.html
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ <h4 class="panel-title">
{% macro lnk_back() %}
<a href="{{url_for('UtilView' + '.back')}}" class="btn btn-sm btn-default" data-toggle="tooltip" rel="tooltip"
title="{{_('Back')}}">
<span class="sr-only">{{ _('Back') }}</span>
<i class="fa fa-arrow-left"></i>
</a>
{% endmacro %}
Expand All @@ -370,27 +371,31 @@ <h4 class="panel-title">
{% macro lnk_add(my_href) %}
<a href="{{my_href}}" class="btn btn-sm btn-primary" data-toggle="tooltip" rel="tooltip"
title="{{_('Add a new record')}}">
<span class="sr-only">{{ _('Add') }}</span>
<i class="fa fa-plus"></i>
</a>
{% endmacro %}

{% macro lnk_edit(my_href) %}
<a href="{{my_href}}" class="btn btn-sm btn-default" data-toggle="tooltip" rel="tooltip"
title="{{_('Edit record')}}">
<span class="sr-only">{{ _('Edit') }}</span>
<i class="fa fa-edit"></i>
</a>
{% endmacro %}

{% macro lnk_show(my_href) %}
<a href="{{my_href}}" class="btn btn-sm btn-default" data-toggle="tooltip" rel="tooltip"
title="{{_('Show record')}}">
<span class="sr-only">{{ _('Show') }}</span>
<i class="fa fa-search"></i>
</a>
{% endmacro %}

{% macro lnk_delete(my_href) %}
<a href="javascript:void(0)" class="btn btn-sm btn-default confirm" rel="tooltip" title="{{_('Delete record')}}"
onclick="var a = new AdminActions(); return a.execute_single_delete('{{my_href}}','{{ _('You sure you want to delete this item?') }}');">
<span class="sr-only">{{ _('Delete') }}</span>
<i class="fa fa-trash"></i>
</a>
{% endmacro %}