components
components copied to clipboard
perf(cdk/table): Optimize a11y role logic in CdkCell.
- Uplevels repeated logic to the host CdkTable which does it once instead of n times.
- Skips setting role=cell in native tables, for which it is already the default (see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#technical_summary)
This saves just over a tenth of a millisecond per cell in the native TD case and about a twentieth in other cases. Doesn't sound like much, but it adds up in larger tables.