Skip to content

Commit 9849b68

Browse files
[Select] Fix some W3C issues
1 parent cd47eea commit 9849b68

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

docs/src/pages/customization/css-in-js/css-in-js.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,8 @@ const Styled = createStyled(theme => ({
387387
}));
388388
```
389389

390+
[@jedwards1211](https://github.com/jedwards1211) Has taken the time to move this module into a package: [material-ui-render-props-styles](https://github.com/jcoreio/material-ui-render-props-styles). Feel free to use it.
391+
390392
### styled-components API (+15 lines)
391393

392394
styled-components's API removes the mapping between components and styles. Using components as a low-level styling construct can be simpler.

packages/material-ui/src/Input/Input.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,6 @@ class Input extends React.Component {
473473
{startAdornment}
474474
<InputComponent
475475
aria-invalid={error}
476-
aria-required={required}
477476
autoComplete={autoComplete}
478477
autoFocus={autoFocus}
479478
className={inputClassName}

packages/material-ui/src/RadioGroup/RadioGroup.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,12 @@ class RadioGroup extends React.Component {
4242

4343
return (
4444
<FormGroup role="radiogroup" {...other}>
45-
{React.Children.map(children, (child, index) => {
45+
{React.Children.map(children, child => {
4646
if (!React.isValidElement(child)) {
4747
return null;
4848
}
4949

5050
return React.cloneElement(child, {
51-
key: index,
5251
name,
5352
inputRef: node => {
5453
if (node) {

packages/material-ui/src/Select/SelectInput.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ class SelectInput extends React.Component {
178178
open: openProp,
179179
readOnly,
180180
renderValue,
181+
required,
181182
SelectDisplayProps,
182183
tabIndex: tabIndexProp,
183184
type = 'hidden',
@@ -186,6 +187,8 @@ class SelectInput extends React.Component {
186187
} = this.props;
187188
const open = this.isOpenControlled && this.displayNode ? openProp : this.state.open;
188189

190+
delete other['aria-invalid'];
191+
189192
let display;
190193
let displaySingle = '';
191194
const displayMultiple = [];
@@ -283,7 +286,6 @@ class SelectInput extends React.Component {
283286
<input
284287
value={Array.isArray(value) ? value.join(',') : value}
285288
name={name}
286-
readOnly={readOnly}
287289
ref={this.handleInputRef}
288290
type={type}
289291
{...other}
@@ -411,6 +413,10 @@ SelectInput.propTypes = {
411413
* @returns {ReactElement}
412414
*/
413415
renderValue: PropTypes.func,
416+
/**
417+
* @ignore
418+
*/
419+
required: PropTypes.bool,
414420
/**
415421
* Properties applied to the clickable div element.
416422
*/

0 commit comments

Comments
 (0)