-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Lists] Change List and ListItem to use ul and li #1168
Comments
@bweggersen That's a good question :) We should probably change it to use |
+1 let's keep the semantic of webpages structure correct. |
@bweggersen @cgestes are either of you interested in taking this up in a PR? |
@oliviertassinari @newoga @mbrookes Let's discuss this too. I think using |
@alitaheri I think this PR is suggesting to change the underlying DOM node to render |
well my only concern is that, |
Yeah that's fair. I think we'd just have to implement it in a way where ListItems and custom composed components are just wrapped in an I think more semantic tags definitely help in terms of finding stuff in the DOM, especially with the inline style approach. |
Yeah, keeping the semantic is very good. but limiting somehow. We'll have to investigate this before trying to implement it. |
I just wanted to add that semantic HTML is also very important for accessibility. Not having this for example makes things less accessible for people using screen readers. cc: @afercia |
@nathanmarks I see |
Is someone already working on this? If not, How should I go about solving it? |
@akshaynaik404 No-one is working on this. If you wanted to help, the contributing guide has some pointers on how to get started. |
In List.js change default prop 'component' to 'ul' and make corresponding changes to List.spec.js and in ListItem.js change default prop 'component' to 'li'. Now by default List should be a 'ul' and ListItem should be an 'li'. Also changed affected integration test in MenuList.spec.js.
HI, tag. Remove this prop from the element." so could you please help me how to resolve this issue or is there any alternative solution to fix this issue. Thanks in Advance.
|
I am trying to warp "ListItem " with div |
@oliviertassinari will be in a better position to answer your query. It would also be helpful if you shared a code snippet along as well. |
@pssuralkar @akshaynaik404, best to use github issues for... issues. Please keep deployment questions on gitter or SO. In general when wrapping a component, the wrapper needs to pass through to the child component any props that the parent component expects the child to support. |
@akshaynaik404 - Below is the code. I want to wrapped list item in div for some CSS styling. <div className={"verticalLine"}>
<ListItem
key={1}
className={this.props.route.route == "/" ? "active" : "null"}
primaryText={"List Item"}
secondaryText={<span className={"horizontalLine"}>{}</span>}
leftIcon={<img src="icon.svg"/>}
primaryTogglesNestedList={true}
initiallyOpen={true}
/>
</div> |
We are looking through the semantics of our website, which uses Material-UI, and we discovered that list items in Material UI doesn't use
<ul>
and<li>
(ie https://github.com/callemall/material-ui/blob/master/src/lists/list-item.jsx#L298). Does anybody know why this is?The text was updated successfully, but these errors were encountered: