-
Notifications
You must be signed in to change notification settings - Fork 12
Conversation
|
||
return ( | ||
<fieldset | ||
aria-invalid={!!error} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any chance we can add a role="radiogroup"
while we're here and fix #838?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get an eslint error when I do that 😢
Non-interactive elements should not be assigned interactive
roles.eslintjsx-a11y/no-noninteractive-element-to-interactive-role
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This ought to have been fixed in jsx-eslint/eslint-plugin-jsx-a11y#746 so I'm not sure what's happening there. Let's leave it for now, I'll update #838
@@ -1,11 +1,216 @@ | |||
import { Radio } from './index'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: filename ought to be Radio.stories.tsx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes. I thought I'd done this but it seems that it didn't recognise radio
-> Radio
as a change so had to hack it slightly.
710bd07
to
705b302
Compare
Co-authored-by: Jamie Lynch <jamie.lynch@theguardian.com>
Co-authored-by: Jamie Lynch <jamie.lynch@theguardian.com>
Co-authored-by: Jamie Lynch <jamie.lynch@theguardian.com>
@@ -13,9 +13,10 @@ export type Parameters = { | |||
[key: string]: any; | |||
}; | |||
|
|||
export type Story = { | |||
(arg0: any): JSX.Element; | |||
export type Story<T = Args> = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this needed now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mob reviewed by @guardian/client-side-infra
* extend story stub with default args and arg types * remove api docs from readme Co-authored-by: Jamie Lynch <jamie.lynch@theguardian.com> * extract radio components into separate modules Co-authored-by: Jamie Lynch <jamie.lynch@theguardian.com> * refactor stories into component-specific stories files Co-authored-by: Jamie Lynch <jamie.lynch@theguardian.com> Co-authored-by: Simon Adcock <simonadcock2@gmail.com> Co-authored-by: Jamie Lynch <jamie.lynch@theguardian.com>
What is the purpose of this change?
Include the API docs for the radio package in Storybook to make them more visible to users
What does this change?
Radio
andRadioGroup
components into their own filescssOverrides
from props as it is inherited from theProps
interface alreadyScreenshots
TODO