Skip to content

Commit

Permalink
Merge pull request #62 from easis/a11y
Browse files Browse the repository at this point in the history
a11y: Added title attribute to action buttons
  • Loading branch information
Kreyu authored Feb 8, 2024
2 parents c4bd0cf + e245571 commit 7b54bce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/Resources/views/themes/bootstrap_5.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@
'data-bs-target': '#' ~ filtration_form.vars.id ~ '__collapse',
'aria-expanded': 'false',
'aria-controls': filtration_form.vars.id ~ '__collapse',
'title': 'Filter'|trans({}, 'KreyuDataTable'),
}|merge(attr|default({})) %}

<button {{ block('attributes') }}>{{ block('action_filter_icon') }}</button>
Expand All @@ -155,6 +156,7 @@
'type': 'button',
'data-bs-toggle': 'modal',
'data-bs-target': '#' ~ export_form.vars.id ~ '__modal',
'title': 'Export'|trans({}, 'KreyuDataTable'),
}|merge(attr|default({})) %}

<button {{ block('attributes') }}>{{ block('action_export_icon') }}</button>
Expand All @@ -172,6 +174,7 @@
'type': 'button',
'data-bs-toggle': 'modal',
'data-bs-target': '#' ~ personalization_form.vars.id ~ '__modal',
'title': 'Personalize'|trans({}, 'KreyuDataTable'),
}|merge(attr|default({})) %}

<button {{ block('attributes') }}>{{ block('action_personalize_icon') }}</button>
Expand Down
6 changes: 3 additions & 3 deletions src/Resources/views/themes/tabler.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
{% endblock %}

{% block action_filter %}
{% with { attr: { class: 'btn btn-primary btn-icon' } } %}
{% with { attr: { class: 'btn btn-primary btn-icon', title: 'Filter'|trans({}, 'KreyuDataTable') } } %}
{{ parent() }}
{% endwith %}
{% endblock %}
Expand All @@ -47,7 +47,7 @@
{% endblock %}

{% block action_export %}
{% with { attr: { class: 'btn btn-primary btn-icon' } } %}
{% with { attr: { class: 'btn btn-primary btn-icon', title: 'Export'|trans({}, 'KreyuDataTable') } } %}
{{ parent() }}
{% endwith %}
{% endblock %}
Expand All @@ -64,7 +64,7 @@
{% endblock %}

{% block action_personalize %}
{% with { attr: { class: 'btn btn-primary btn-icon' } } %}
{% with { attr: { class: 'btn btn-primary btn-icon', title: 'Personalize'|trans({}, 'KreyuDataTable') } } %}
{{ parent() }}
{% endwith %}
{% endblock %}
Expand Down

0 comments on commit 7b54bce

Please sign in to comment.