Skip to content

fix: query DOM element without role for cross-platform compatibility - #237

Merged
ghiscoding merged 1 commit into
mainfrom
bugfix/stripped-role
Mar 8, 2024
Merged

fix: query DOM element without role for cross-platform compatibility#237
ghiscoding merged 1 commit into
mainfrom
bugfix/stripped-role

Conversation

@ghiscoding

@ghiscoding ghiscoding commented Mar 8, 2024

Copy link
Copy Markdown
Owner
  • I was a little bit surprised about this but on certain platforms (mainly Salesforce in my case), the role attributes might completely stripped out of the final DOM template. So the DOM query I was using for arrow highlight navigation wasn't working at all in Salesforce. So removing [role] from the query selector is enough to get it working, however I'll add li[datakey] to get it working in Salesforce but still keep it focused to our expected list of elements to query for the arrow navigation to work

- I was a little bit surprised about this but on certain platform (mainly Salesforce in my case), the `role` attributes are completely stripped. So the DOM query I had for arrow highlight navigation wasn't working in Salesforce. So removing `[role]` query selector but adding another type of attribute to keep query still focused with `li[datakey]` is enough to get it working in Salesforce
@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@ghiscoding
ghiscoding merged commit 1a71fe4 into main Mar 8, 2024
@ghiscoding
ghiscoding deleted the bugfix/stripped-role branch March 8, 2024 21:00
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.

1 participant