mi6 / mi6/ic-ui-kit

[ic-data-dable] Screen reader sorting indicator shows on screen when using RTL language

Open
#2,905 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
53
Forks
63
Avg merge
2d 4h
Merged PRs (30d)
15

Description

## Summary of the bug

When using a RTL language, (dir="rtl" on the ), the text "table unsorted" appears way over to the right instead of being off screen. See the screenshot below for an image of a live example of this.

## 🪜 How to reproduce

1. Set `dir="rtl"` on ``
2. Add an ic-data-table
3. Observe the text "table unsorted" appear when you scroll far enough to the left

## 📸 Screenshots or code

![Screen Shot 2024-12-16 at 12 58 38](https://github.com/user-attachments/assets/82caeb9e-2335-42cb-8bb7-08bab5cdf5cc)

## 🖥 📱 Device
- Type: desktop
- Device: mac os
- Browser version: Firefox 133

## 🧐 Expected behaviour

The text should be hidden, except for screen readers

## 📝 Acceptance Criteria
If relevant, describe in full detail the different interactions and edge cases that the component or patterns needs to fulfil.

*Given* dir attribute is "rtl"
*When* an ic-data-table is used
*Then* the screen reader hint is not visible

## Additional info

In testing, switching the CSS to use `right:` instead of `left:` fixed the issue.

The [:dir](https://developer.mozilla.org/en-US/docs/Web/CSS/:dir) selector could be used to fix this.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the ic-data-table component and inspect the CSS that positions the “table unsorted” screen-reader hint. Reproduce the issue with , then verify the hint is hidden visually while remaining available to screen readers and that the existing behavior is preserved for other directions.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
accessibility, frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.