Template:Circa/doc/sortable

From the AARoads Wiki: Read about the road before you go
Jump to navigation Jump to search

If the parameter "sortable=yes" is specified, the template generates invisible text that will cause the column to sort correctly in sortable tables. However, it is at the cost of having that invisible text read out audibly by many screen readers. "Col 1" without the parameter does not sort correctly. "Col 2" with the sortable parameter sorts correctly.

Title Col 1 Col 2
Foo 1066 1066
Bar c. 1510 1510 c. 1510
Baz 1956 1956
Jaz c. 410 0410 c. 410
{| class="sortable wikitable" style=text-align:right;
|-
! Title!!Col 1!!Col 2
|-
| style=text-align:left; | Foo|| 1066|| 1066
|-
| style=text-align:left; | Bar|| c. 1510|| {{circa|1510|sortable=yes}}
|-
| style=text-align:left; | Baz|| 1956|| 1956
|-
| style=text-align:left; | Jaz|| c. 410|| {{circa|410|sortable=yes}}
|}