Live data from Hacker News

On The (2021)

benmyers.dev

31–40 of 138 posts

Re: On The <dl> (2021)

#31
>

This is incorrect:

1. has no corresponding (viz. implicit) role, but can be given the role group, list, none or presentation https://w3c.github.io/html-aria/#el-dl>.

2. You’re only allowed to define aria-label on elements that have a compatible role, implicit or explicit https://w3c.github.io/html-aria/#docconformance-naming>.

3. aria-label is allowed on all but a handful of roles https://www.w3.org/TR/wai-aria-1.2/#aria-label>, which in this case knocks out presentation and none, leaving group and list.

4. group doesn’t feel right, list feels acceptable.

In summary: either ditch the aria-label, or add role="list" (meaning also role="listitem" on children).

—⁂—

One thing the article misses is that you can have multiple in a row too, not just . The spec has a good example: https://html.spec.whatwg.org/multipage/grouping-content.html...

They’re not name–value pairs, they’re name–value groups.

Re: On The <dl> (2021)

#32
The tag seems to cover a subset of a broad semantic space, but doesn’t easily extend beyond adding another .

I dunno, I guess I’m a caveman. If it looks right and works (including accessibility) then I figure I’m pursuing something that doesn’t matter a lot.

Re: On The <dl> (2021)

#33

I love DL. I think tables, at least in the past, were misused as DLs even more in the past and the inconvenience of the table markup is even worse than a bunch of divs.

I always thought the DL as a single row of a table.

Re: On The <dl> (2021)

#34

The final example of the DnD statt sheet makes me think whether it's legal to nest s? I.e. can we do Actions ...

Yes. Any flow content is permitted inside a . See: https://html.spec.whatwg.org/#the-dd-element https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/...

I do it to render nested JSON objects, for example.

Re: On The <dl> (2021)

#35

Earlier quoted context omitted.

Isn't markdown table just a bunch of | ?

That's the problem.

most specifically the problem is that markdown tables don't allow breaking the table row in multiple lines

but then you can always use HTML tables in markdown and Pandoc transforms it just fine

Re: On The <dl> (2021)

#37

> Prior to HTML5, this was called a definition list. This is because the was originally only intended to represent glossaries of terms and their definitions. TIL I’ve been naming it wrong for a decade.

I don’t want to check what year html5 was standardized because I think it may be north of a decade ;)

Re: On The <dl> (2021)

#38

I love DL. I think tables, at least in the past, were misused as DLs even more in the past and the inconvenience of the table markup is even worse than a bunch of divs.

It's not that inconvenient if you omit unnecessary closing tags: first second what ever I find it simpler and cleaner than any of the markdown table markups

Fair point, though /DT and /DD are also optional just like /TH, /TD and /TR are. So in effect, def…scription list could structurally save you one TR for each entry and two "BLE"s:

    Term 1Definition 1
           Term 2Definition 2
    
    Term 1Definition 1
        Term 2Definition 2
    

Re: On The <dl> (2021)

#39
post #35

Earlier quoted context omitted.

That's the problem.

most specifically the problem is that markdown tables don't allow breaking the table row in multiple lines but then you can always use HTML tables in markdown and Pandoc transforms it just fine

Every markdown implementation is supposed to allow inline HTML.

Re: On The <dl> (2021)

#40
post #23

> Admittedly, however, support for the element is not yet universal. Wait what? has been in HTML since.. the first draft in 1993! I like DL's but they can be challenging to style. This article is using a lot of fixed pixel widths which would break on really small screens or larger data.

[deleted]
Post reply on HN