Skip to content

Commit

Permalink
Revert "fix: table rows with breakout trigger are not accessible belo…
Browse files Browse the repository at this point in the history
…w fold"

This reverts commit db338b3.
  • Loading branch information
czabaj committed Aug 26, 2024
1 parent db338b3 commit 015b0cc
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
6 changes: 5 additions & 1 deletion src/pages/PlacePersonsSetting/PlacePersonsSetting.module.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
.table {
--breakout-hover-overlay: hsl(47deg 100% 62% / 0.1);
}
.table [role="row"] {
.table tr {
position: relative;
/* FIX: Safari does not support positioning of <tr>
@see https://github.com/w3c/csswg-drafts/issues/1899
*/
clip-path: inset(0);
}
.table :where(td, th) {
text-align: left;
Expand Down
6 changes: 2 additions & 4 deletions src/pages/PlacePersonsSetting/PlacePersonsSetting.res
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,7 @@ let make = (~placeId) => {
<tbody>
{personsAll
->Array.map(((personId, person)) => {
/* FIX: Safari does not support relative positioning of <tr>, div[role=row] is a workaround
@see https://github.com/w3c/csswg-drafts/issues/1899 */
<div key=personId role="row">
<tr key=personId>
<th scope="row">
{React.string(person.name)}
<button
Expand Down Expand Up @@ -142,7 +140,7 @@ let make = (~placeId) => {
format={FormattedCurrency.formatAccounting} value=person.balance
/>
</td>
</div>
</tr>
})
->React.array}
</tbody>
Expand Down
6 changes: 5 additions & 1 deletion src/pages/PlaceSetting/ChargedKegs.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@
.table > * {
display: contents;
}
.table :where(tr, [role="row"]) {
.table tr {
position: relative;
/* FIX: Safari does not support positioning of <tr>
@see https://github.com/w3c/csswg-drafts/issues/1899
*/
clip-path: inset(0);
display: grid;
grid-template-areas: "serial beer volume created price remains";
grid-template-columns: 5ch 22ch 7ch 12ch 12ch 1fr;
Expand Down
6 changes: 2 additions & 4 deletions src/pages/PlaceSetting/ChargedKegs.res
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ let make = (~chargedKegs: array<Db.kegConverted>, ~onAddNewKeg, ~onKegDetail) =>
->Array.map(keg => {
let kegId = Db.getUid(keg)
let volume = keg.milliliters
/* FIX: Safari does not support relative positioning of <tr>, div[role=row] is a workaround
@see https://github.com/w3c/csswg-drafts/issues/1899 */
<div key={kegId} role="row">
<tr key={kegId}>
<th scope="row">
{React.string(keg.serialFormatted)}
<button
Expand All @@ -56,7 +54,7 @@ let make = (~chargedKegs: array<Db.kegConverted>, ~onAddNewKeg, ~onKegDetail) =>
<td>
<MeterKeg ariaLabelledby="remaining_th" keg />
</td>
</div>
</tr>
})
->React.array}
</tbody>
Expand Down

0 comments on commit 015b0cc

Please sign in to comment.