docs: fix a11y router examples (#23031)
Non-interactive elements such as a `<span>` should not have event bindings as they are not accessible by everyone. This fix solves this issue by replacing it with a `<button>` which is suitable for interaction. Since a button defaults to `type="submit"` the button also explicitly has a `type="button"` to prevent accidental form submits (all examples aim to navigate, not to submit a form). [More background on this a11y best practice](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/no-static-element-interactions.md)
Showing
Please
register
or
sign in
to comment