ARIA: remove aria-sort from sort button; Password column tests
- Sort button: aria-sort removed (button role does not support it). - Index tests: remove aria-sort assertions; add Password column display tests.
This commit is contained in:
parent
c6082f2831
commit
541c79e501
2 changed files with 39 additions and 12 deletions
|
|
@ -20,7 +20,6 @@ defmodule MvWeb.TableComponents do
|
|||
type="button"
|
||||
phx-click="sort"
|
||||
phx-value-field={@field}
|
||||
aria-sort={aria_sort(@sort_field, @sort_order, @field)}
|
||||
class="flex items-center gap-1 hover:underline focus:outline-none"
|
||||
>
|
||||
<span>{@label}</span>
|
||||
|
|
@ -33,12 +32,4 @@ defmodule MvWeb.TableComponents do
|
|||
</button>
|
||||
"""
|
||||
end
|
||||
|
||||
defp aria_sort(current_field, current_order, this_field) do
|
||||
cond do
|
||||
current_field != this_field -> "none"
|
||||
current_order == :asc -> "ascending"
|
||||
true -> "descending"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue