Skip to content

GAUD-9091: Fixing Keyboard Navigation In Calendar For RTL Langs#7048

Open
EdwinACL831 wants to merge 3 commits into
mainfrom
ecollazos/GAUD-9091_rtl_calendar_HOME_and_END_keyboard_keys
Open

GAUD-9091: Fixing Keyboard Navigation In Calendar For RTL Langs#7048
EdwinACL831 wants to merge 3 commits into
mainfrom
ecollazos/GAUD-9091_rtl_calendar_HOME_and_END_keyboard_keys

Conversation

@EdwinACL831
Copy link
Copy Markdown
Contributor

@EdwinACL831 EdwinACL831 commented Jun 5, 2026

Jira

GAUD-9091

Solution

  • Refactors logic to comply with the AXE regulations for calendar navigation. Independently from the language (RTL or LTR) when pressing HOME key should go to the starting day of the week. On the other hand when pressing END should go to the last day of the week.

- Refactors logic to comply with the AXE regulations for calendar
  navigation. Independently from the languange (RTL or LTR) when
  pressing HOME key should go to the starting day of the week. On the
  other hand when pressin END should go to the last day of the week.
  This is according to each calendar
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2026

Thanks for the PR! 🎉

We've deployed an automatic preview for this PR - you can see your changes here:

URL https://live.d2l.dev/prs/BrightspaceUI/core/pr-7048/

Note

The build needs to finish before your changes are deployed.
Changes to the PR will automatically update the instance.

@EdwinACL831 EdwinACL831 marked this pull request as ready for review June 5, 2026 20:25
@EdwinACL831 EdwinACL831 requested a review from a team as a code owner June 5, 2026 20:25
@dbatiste
Copy link
Copy Markdown
Contributor

dbatiste commented Jun 5, 2026

I agree that Home key should move to the first day of the week (right-most day when using Arabic). And for the End key, it should move to the last day of the week (left-most day when using Arabic).

It is however weird for laptop users, because Fn+left arrow is Home, and Fn+right arrowis End, so when using Arabic, the directional movement does not match the keys they are pressing. Normally it would, for example when using Cmd+left arrow and Cmd+right arrow to select a string within an input, like "العربية (المملكة العربية السعودية)".

@EdwinACL831
Copy link
Copy Markdown
Contributor Author

I agree that Home key should move to the first day of the week (right-most day when using Arabic). And for the End key, it should move to the last day of the week (left-most day when using Arabic).

It is however weird for laptop users, because Fn+left arrow is Home, and Fn+right arrowis End, so when using Arabic, the directional movement does not match the keys they are pressing. Normally it would, for example when using Cmd+left arrow and Cmd+right arrow to select a string within an input, like "العربية (المملكة العربية السعودية)".

I get your point and probably it will, I can test that on my laptop. And I also see that mine has an actual home button and end button (basically F11 and F12 are by default my Home and End buttons respectively). I can test how that works and fells but yeah I think this is scoped only to the calendar component according to WCAG, so maybe RTL users don't get mad very often.

@dbatiste
Copy link
Copy Markdown
Contributor

dbatiste commented Jun 5, 2026

I think this is what we want... that mapping just seems weird for laptop keyboards, but I think it is more of a hardware/OS thing. In the end, we were responding to the Home (36) and End (35) key codes.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
expect(calendar._shownMonth).to.equal(8);
});

describe('RTL', () => {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually ran these 2 test with the previous implementation and they did fail. then rerun them after my changes and all was 🟢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants