{{ aspExample({ code: "", nunjucks: "", json: "", title: "", example: "default", id: "65a92fd59d3c8" }) }}
WIP – Column widths are calculated by the browser based on the available space and the content within each column. The exact distribution of widths is determined by the browser’s table layout algorithm and is therefore not directly controllable.
The only way to enforce consistent column widths is to assign fixed or equal widths to the columns. However, this can still result in wrapping where the available width is insufficient and, in many cases, may increase the amount of wrapping rather than reduce it. For this reason, fixed column widths are generally only used where the content is predictable and of a consistent length, or where a specific column is known to contain short, uniform values that can reliably fit on a single line.
When designing tables, aim to minimise the amount of data displayed in a single view. Where practical, consider splitting large datasets across multiple tables, pages, or views. This improves readability, reduces the likelihood of excessive wrapping, and allows the browser greater flexibility in allocating column widths.
Use the table component to let users compare information in rows and columns.
Use tables to present data or information that can be organised in a structured way. This could consist of numbers, text or statistics.
A table should make it easy to:
Do not use tables for cosmetic reasons or when you can use normal page structure to present the information, for example headers or lists.
Never use the table component to layout content on a page. Instead, use the grid system.
WIP – There is a visually hidden span which is read out by screenreaders that states the sorting order that will be applied when the button is next clicked. This can be either descending or ascending.
The form should submit with params, so the page can be reloaded/shared with the current state, also history can be preserved per pageload.
{{ aspExample({ code: "<form action=\"#results\">The below criteria all need to be met for a component to be considered as fully developed for use within the ASP Digital Design System.
| Development criteria | Status |
|---|---|
| WCAG 2.2 compliant | Not started |
| WCAG 2.1 compliant | Failing |
| HTML / Nunjucks version | Complete |
| Figma version | Not started |
| M365 versions | Not started |
| Documentation | In progress |
Suggest an edit to this system, or any of the components in it, by submitting a Design System change request.