The cards should be articles in our docs. We should have a look at this after https://github.com/twbs/bootstrap/pull/28517 is merged.
The tests have failed because there is a rule that requires adding headings in all blocks of type
Why should the cards be articles?
Why should the cards be articles?
It's just a semantic improvement. See https://html.spec.whatwg.org/multipage/sections.html#the-article-element
@patrickhlauke can you chime in please?
I personally don't think we can just replace all of our docs cards with articles, hence the validator errors.
I personally don't think we can just replace all of our docs cards with articles, hence the validator errors.
We can't replace _all_ cards and shouldn't ignore these errors indeed.
personally, i'm not sure i see a strong enough need for using <article> in general, unless i was doing something like a list of news items or similar. would developers cargo-cult this for other uses, like notes/panels and that sort of thing? if so, they'll end up overcomplicating their structure for no reason (and making their pages overly verbose for AT users, who'd constantly hear when entering/exiting an article section).
Thanks @patrickhlauke for the insights. That's what I was also afraid of.
a slightly more neutral alternative would also be <section> https://html.spec.whatwg.org/multipage/sections.html#the-section-element which doesn't have that implication that <article> has about being self-contained and being potentially ripped out of the page as a stand-alone complete piece of content.
but otherwise, perhaps keep the markup as <div> elements, but add a note saying that of course these classes can also be applied to other containers, like <section>, <article>, if the authors feel their content requires clearer/stricter structuring (and just in terms of how AT handle stuff, @stevefaulkner reminded me that if a <section> doesn't have a heading, it will be exposed in exactly the same way as a <div>)
Most helpful comment
a slightly more neutral alternative would also be
<section>https://html.spec.whatwg.org/multipage/sections.html#the-section-element which doesn't have that implication that<article>has about being self-contained and being potentially ripped out of the page as a stand-alone complete piece of content.but otherwise, perhaps keep the markup as
<div>elements, but add a note saying that of course these classes can also be applied to other containers, like<section>,<article>, if the authors feel their content requires clearer/stricter structuring (and just in terms of how AT handle stuff, @stevefaulkner reminded me that if a<section>doesn't have a heading, it will be exposed in exactly the same way as a<div>)