Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ui5-table): improve accessibility #2534

Merged
merged 1 commit into from
Dec 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/main/src/Table.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<table border="0" cellspacing="0" cellpadding="0" @keydown="{{_onkeydown}}">
<table border="0" cellspacing="0" cellpadding="0" @keydown="{{_onkeydown}}" role="table">

<thead>
<tr id="{{_id}}-columnHeader" class="ui5-table-header-row" tabindex="0" style="height: 48px" @click="{{_onColumnHeaderClick}}">
<tr id="{{_id}}-columnHeader" role="row" class="ui5-table-header-row" tabindex="0" style="height: 48px" @click="{{_onColumnHeaderClick}}">
{{#each visibleColumns}}
<slot name="{{this._individualSlot}}"></slot>
{{/each}}
Expand All @@ -15,8 +15,8 @@

{{#unless rows.length}}
{{#if showNoData}}
<tr class="ui5-table-no-data-row-root">
<td colspan="{{visibleColumnsCount}}">
<tr class="ui5-table-no-data-row-root" role="row">
<td colspan="{{visibleColumnsCount}}" role="cell">

<div class="ui5-table-no-data-row">
<span>{{noDataText}}</span>
Expand Down
1 change: 1 addition & 0 deletions packages/main/src/TableCell.hbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<td
tabindex="-1"
part="cell"
role="cell"
>
<slot></slot>
</td>
1 change: 1 addition & 0 deletions packages/main/src/TableColumn.hbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<th
scope="col"
part="column"
role="columnheader"
>
<slot></slot>
</th>
5 changes: 3 additions & 2 deletions packages/main/src/TableRow.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
aria-label="{{ariaLabelText}}"
data-sap-focus-ref
part="row"
role="row"
>
{{#if shouldPopin}}
{{#each visibleCells}}
Expand All @@ -20,8 +21,8 @@

{{#if shouldPopin}}
{{#each popinCells}}
<tr part="popin-row" class="{{this.classes}}" @click="{{../_onrowclick}}">
<td colspan="{{../visibleCellsCount}}">
<tr part="popin-row" role="row" class="{{this.classes}}" @click="{{../_onrowclick}}">
<td colspan="{{../visibleCellsCount}}" role="cell">
{{#if this.popinText}}
<span class="ui5-table-row-popin-title">{{this.popinText}}:</span>
{{/if}}
Expand Down