Below is the code I am trying to execute, but facing error in converting it to keyboard accessible:
<p className={styles['clear-text']} onClick={clearAllFilters}>
{'Clear All'}
</p
here is an official explanation https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-noninteractive-element-to-interactive-role.md.
In short: either change the element type or make an exception in the eslint settings. Regarding settings, there are 2 options: global setting of special comments