Skip to content
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

Issue504 description list roles #951

Merged
merged 27 commits into from Jul 11, 2019
Merged

Conversation

jongund
Copy link
Contributor

@jongund jongund commented Apr 14, 2019

Proposal for role parity for description list is to create two new roles listitemdescription and listitemterm which would be children of a list.


Preview | Diff

@jongund
Copy link
Contributor Author

jongund commented Apr 18, 2019

@jnurthen
Based on JN feedback on issue 504 I created a description list role. I also renamed the term and description roles, the following is a list of the new roles:

  • descriptionlist
  • descriptionterm
  • descriptionitem

Preview of ARIA Specification with new description list roles

Example:

<div role="discriptionlist">
   <div role="descriptionterm">Quadrate</div>
   <div role="descriptionitem">Make square. Example: "the materials are there quadrated or formed into rectangular blocks"</div>
   <div role="descriptionitem">Conform or cause to conform.  Example: "he had to make a creed which would quadrate with his immorality"</div>
  .....
</div>

index.html Outdated

<p>Author requirements for <a>elements</a> whose <a>role</a> is <code>descriptionitem</code>:</p>
<ul>
<li>MUST be contained in a element whose <a>role</a> is <rref>descriptionlist</rref>.</li>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 instances of "a element" that need to be "an element"

@carmacleod
Copy link
Contributor

Note that one description can also have multiple terms, i.e. example in HTML spec where "Color" and "Colour" have the same description.

So for descriptionterm, might want to add:

  • MAY be followed by one or more sibling elements whose role is also descriptionterm.

And for descriptionitem, might want to add:

  • MAY be followed by one or more sibling elements whose role is also descriptionitem.

Also, descriptionlist needs to allow for the possibility of multiple terms having the same definition in this sentence:

Description lists contain children whose role is descriptionitem and descriptionterm to represent a list of terms each having one or more descriptions.

@carmacleod
Copy link
Contributor

What should we do about the old ARIA definition and term roles?

  • Keep 'definition' for parity with 'dfn' (would need to remove 'dd' from related concepts)?
  • What about term? Is it now superseded by 'descriptionterm'?

index.html Outdated
@@ -8315,6 +8314,7 @@ <h5>Presentational Roles Conflict Resolution</h5>
<div class="role-description">
<p>A word or phrase with a corresponding definition. See related <rref>definition</rref>.</p>
<p>The <code>term</code> role is used to explicitly identify a word or phrase for which a <rref>definition</rref> has been provided by the author or is expected to be provided by the user.</p>
<p>Authors SHOULD provide a reference to an element with role <rref>term</rref> from each related element with role <rref>defintion</rref> using the <pref>aria-labelledby</pref> <a>attribute</a>.</p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

defintion typo; should be definition

Copy link
Member

@scottaohara scottaohara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some thoughts, some things I think need updating. Happy to discuss further.

index.html Outdated Show resolved Hide resolved
index.html Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
@scottaohara
Copy link
Member

With the decoupling of term from dt and definition from dd, I've been mulling over these roles some more, it seems the related concepts are misaligned...

In HTML:

The dfn element represents the defining instance of a term.

An example of using the dfn element:

<dfn>Apple</dfn> is a type of fruit, or computer, or record label.

<dfn> (which was clearly the wrong element name) matches ARIA's role=term:

A word or phrase with a corresponding definition.

Now, looking at role=definition:

A definition of a term or concept.

The related concepts did list dd and dfn, but with the removal of dd it appears to me that role=definition is really the role that should no longer have a related concept element, as dfn is better aligned with role=term.

HTML AAM already maps role=term to <dfn> and role=definition to <dd> (which will have to be changed in the future...)

index.html Outdated Show resolved Hide resolved
@jongund
Copy link
Contributor Author

jongund commented Apr 29, 2019

@mcking65 @johnfoliot
This is a response to Matt Kings comment on using dlist instead of descriptionlist for the role name in issue 504.

I like the idea of not having the entire word "description" in the role name, so dlist or maybe a little better would be desclist role, instead of descriptoinlist. My main concern with including list in the term role is that there will be two "t"'s in a row: dlistterm, but maybe it can't be helped.

Option 1:

  • dlist
  • dlistterm
  • dlistitem

Option 2:

  • desclist
  • desclistterm
  • desclistitem

I like the desclist option a little better, since it is clear what the "d" stands for, what do other people think?

@jnurthen
Copy link
Member

My personal opinion is that we should not abbreviate this. I'd prefer a long but descriptive role over an abbreviated one.

@carmacleod
Copy link
Contributor

index.html Outdated
@@ -3600,9 +3871,8 @@ <h2>Definition of Roles</h2>

<ul>
<li>All elements with role <code>legend</code> are associated with one or more elements with grouping roles.</li>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed the broken list

@jongund
Copy link
Contributor Author

jongund commented May 2, 2019

I have updated the new roles to use:

  • associationlist
  • associationlistitemkey
  • associationlistitemvalue

Updates to the term and definition roles will be in another pull request.

@css-meeting-bot
Copy link
Member

The ARIA Working Group just discussed description lists.

The full IRC log of that discussion <HarrisSchneiderman> topic: description lists
<jamesn> GitHub: https://github.com//pull/951
<HarrisSchneiderman> jongund: the biggest discussion at this point is naming these 3 roles
<HarrisSchneiderman> jongund: the other part is the 2 other roles: term and definition. I believe when they were originally conceived, they were meant to be a part of this pattern
<HarrisSchneiderman> jongund: potentially out of sync with html's dfn tag
<HarrisSchneiderman> mck: it seemed like everyone was leaning towards option 2 - not reusing
<jongund> https://raw.githack.com/w3c/aria/issue504-description-list-roles/index.html#descriptionitem
<HarrisSchneiderman> mck: the more I was looking at it...it seemed like the arguments were that we needed to add list semantics
<HarrisSchneiderman> mck: and that the list semantic was as important
<HarrisSchneiderman> mck: a list item is made of at least 1 of each dd and dt
<HarrisSchneiderman> mck: there was concern that definition and term, because they don't have a list semantic, they do not distinguish themselves adequately from dfn and term
<HarrisSchneiderman> mck: is it a bad idea to have a role which, when used inside of a def list, and otherwise not
<HarrisSchneiderman> jamesn: the other complexity is - we've had a hard enough time defining the existing ones (term and definition)
<HarrisSchneiderman> jongund: with the current proposal it is really clear what these roles are for
<HarrisSchneiderman> jongund: It'd be hard to use these incorrectly
<HarrisSchneiderman> mck: the naming is unfortunate. the term definition is loaded in the accessibility world
<HarrisSchneiderman> jamesn: we shouldn't use the term that html has rejected
<HarrisSchneiderman> jamesn: I'm not opposed to coming up with something different though...
<HarrisSchneiderman> carmacleod: what about "dlist"?
<HarrisSchneiderman> mck: I was trying to avoid the word description
<HarrisSchneiderman> mck: aria-describedby...the way we talk about descriptions of elements...
<HarrisSchneiderman> joanie: "termlist"?
<HarrisSchneiderman> jamesn: according to the spec, it represents an "association list"
<HarrisSchneiderman> jamesn: we definitely shouldn't use term and definition
<HarrisSchneiderman> mck: "listitemname" and "listitemvalue"
<HarrisSchneiderman> joanie: thats why I'm thinking "dictionarylist"
<HarrisSchneiderman> carmacleod: "associationlist" is pretty generic and applies to all of the above
<HarrisSchneiderman> jongund: I can see the confusion with "description"
<HarrisSchneiderman> jongund: the closer to the tag we name it, the more likely developers are likely to use this properly
<HarrisSchneiderman> joanie: we should definitely be in favor of documentation...but as a developer, if you have to go find/read to figure out what a thing is then we've done it wrong
<HarrisSchneiderman> joanie: whatever we come up with should be a self-contained thing and "dlist" is not
<HarrisSchneiderman> jamesn: on the other hand, if someone is using this, they better be reading documentation
<HarrisSchneiderman> mck: the only thing people will find intuitive is "dl"
<HarrisSchneiderman> mck: "assocationlist" seems like a good candidate to me
<HarrisSchneiderman> mck: my only request about the things inside (children) is that I think the rolename should start with listitem to avoid confusion
<HarrisSchneiderman> mck: to avoid "Is this the first part? or the second part?"
<HarrisSchneiderman> mck: It can be any combination of <dt />s and <dd />s within the item
<HarrisSchneiderman> mck: appending the 2 different things with "listitem" will make purpose clear
<HarrisSchneiderman> glen: can you put listitem term inside of a plain list?
<HarrisSchneiderman> glen: it doesn't make it clear that the key/value belong in the associationlist
<HarrisSchneiderman> mck: this is complicated because we have 2 different things that can be within an item
<HarrisSchneiderman> mck: Think "menu" and "menuitem"
<HarrisSchneiderman> jamesn: are we good with what is in the current PR?
<HarrisSchneiderman> melanie: in html aam definition list maps to list, dt maps to role=term, dd maps to role=defintion. so why are we changing it now?
<HarrisSchneiderman> jamesn: the 2 above have a use still (outside the scope of dl)
<HarrisSchneiderman> jamesn: dfn maps to term, which is maybe wrong
<HarrisSchneiderman> mck: to answer melanie, it'd be too complicated to write the definition role so that it can be used both within and outside a list
<HarrisSchneiderman> melanie: maybe its a bug within aam if/when we add these
<HarrisSchneiderman> mck: the one thing it should not be a "descriptionlistdescription"
<HarrisSchneiderman> joanie: thats why i like key/value
<HarrisSchneiderman> bg: what about the actual word "definition"?
<HarrisSchneiderman> jongund: html5 rejected it
<HarrisSchneiderman> mck: "descriptionlistitemkey" / "descriptionlistitemvalue"
<HarrisSchneiderman> parent would be "descriptionlist"
<HarrisSchneiderman> joanie: does this role need to be contained within some sort of "descriptionlistitem"?
<HarrisSchneiderman> mck: this is just like "menuitemradio"/"menuitemradiocheckbox"
<HarrisSchneiderman> melanie: I was thinking "keyvaluelist" "keyitem" "valueitem"
<HarrisSchneiderman> mck: in reality, theres no excuse for not using a p tag instead of role=paragraph
<HarrisSchneiderman> jongund: there are other ways to do this in html...if you read the dfn element spec, you can use it to identify the term and the <definition> is contained within that
<HarrisSchneiderman> jongund: and all of the above would be contained in a list item
<HarrisSchneiderman> mck: the reality is that no one will type these attributes
<HarrisSchneiderman> jongund: what would AT call an "associationlist"?
<HarrisSchneiderman> glen: I'd call it an "Association list" because that makes sense from a technical perspective
<jamesn> <dl>
<jamesn> <dt><dfn>Apartment</dfn>, n.</dt>
<jamesn> <dd>An execution context grouping one or more threads with one or
<jamesn> more COM objects.</dd>
<jamesn> <dt><dfn>Flat</dfn>, n.</dt>
<jamesn> <dd>A deflated tire.</dd>
<jamesn> <dt><dfn>Home</dfn>, n.</dt>
<jamesn> <dd>The user's login directory.</dd>
<jamesn> </dl>
<HarrisSchneiderman> jongund: Lets ask this again to screen reader creators: what would AT call an "associationlist"?
<HarrisSchneiderman> mck: in the FAQ case, theres no way for JAWS to know that we've got questions
<HarrisSchneiderman> jongund: when you render a dt...do you tell people you are on term x of y?
<HarrisSchneiderman> bg: from a user perspective, I'd like to see AT saying "term" and the name (content) and arrows would take you to each value that would apply to that
<HarrisSchneiderman> jongund: the benefit of the user of these is that they'd hopefully be exposed to this useful information
<HarrisSchneiderman> bg: they need to differentiate these
<HarrisSchneiderman> glen: this is going to break things...older versions of screen readers will not be compatible
<HarrisSchneiderman> glen: it depends on what the platform maps it to...
<HarrisSchneiderman> glen: if we map it to something new, this could be problematic
<HarrisSchneiderman> joanie: in terms of acccessibility APIs, for the most part there haven't been many new roles created
<HarrisSchneiderman> joanie: For atk, its role descriptionvalue
<joanie> https://w3c.github.io/html-aam/#el-dd
<HarrisSchneiderman> joanie: for the above aam definition: the dd element wai-aria definition role
<HarrisSchneiderman> mck: so the above definitions occur within lists...melanie would you know this type of thing?
<joanie> https://w3c.github.io/core-aam/#details-id-16
<joanie> https://w3c.github.io/html-aam/#el-dt
<HarrisSchneiderman> bg: in my firefox example, looks like the dl element maps to role=list, dt maps to role=listitem, and dd doesn't map to anything
<joanie> https://w3c.github.io/core-aam/#details-id-75
<HarrisSchneiderman> joanie: there is no spec here saying that these things map to a listitem
<joanie> https://w3c.github.io/html-aam/#el-dl
<HarrisSchneiderman> mck: option 1 is don't create roles for the things inside of the list
<HarrisSchneiderman> q?
<HarrisSchneiderman> bg: theres value in distinguishing these
<HarrisSchneiderman> bg: its not so easy to identify where the term is and where the value is
<HarrisSchneiderman> glen: i don't think jaws currently distinguishes these
<HarrisSchneiderman> jongund: what does jaws do with role=definition / role=term
<HarrisSchneiderman> ack jongund
<HarrisSchneiderman> jongund: it seems to me that if it is a definition list, you should be able to use list item navigation
<HarrisSchneiderman> jamesn: We seem to have a number of things here...creating the role parity with the current dl,dt,dd can be separated from how well browsers/AT support them
<HarrisSchneiderman> jamesn: what we need to come up with here are the names of these attributes
<HarrisSchneiderman> melanie: what if we create a couple different options and ask for dev feedback?
<HarrisSchneiderman> jamesn: <head shaking no />
<HarrisSchneiderman> mdk: if you see it in code, you want to understand what is going on
<HarrisSchneiderman> jongund: people shouldn't really use these roles anyway...
<HarrisSchneiderman> "associationlist" is at least similar to whatwg html spec...
<HarrisSchneiderman> mck: can people live with "assocationlist", "assocationlistitemkey" and "associationlistitemvalue"
<HarrisSchneiderman> hs: are we all agreeing out of exhaustion??
<HarrisSchneiderman> melanie: what I worry about more after seeing "associationlist" and not realize that they are dealing with a dl alternative
<HarrisSchneiderman> jamesn: do we have a conclusion?
<HarrisSchneiderman> jongund: what about the our definition role and our term role?
<HarrisSchneiderman> jongund: you have some type of container element (li for example) and inside you have a term
<jamesn> definition = A definition of a term or concept. See related term.
<jamesn> Authors SHOULD identify the element being defined by giving that element a role of term and referencing it with the aria-labelledby attribute.
<HarrisSchneiderman> joanie: we'll need a PR to fix these tables
<HarrisSchneiderman> jamesn: are the mapping in html amm correct?
<HarrisSchneiderman> joanie: yes
<MichaelC_travel> rrsagent, make minutes
<RRSAgent> I have made the request to generate https://www.w3.org/2019/05/01-aria-minutes.html MichaelC_travel
<MichaelC_travel> rrsagent, bye
<RRSAgent> I see no action items
<MichaelC_travel> zakim, bye
<Zakim> leaving. As of this point the attendees have been melanierichards, jongund, jamesn, carmacleod, HarrisSchneiderman, Joanmarie_Diggs, CurtBellew, Bryan_Garaventa

@schne324
Copy link
Contributor

schne324 commented May 2, 2019

we need to specify more about what is allowed in each "group" of associationlistitems...Taken from html spec:

Each term-description group consists of one or more terms (represented by dt elements) possibly as children of a div element child, and one or more descriptions (represented by dd elements possibly as children of a div element child), ignoring any nodes other than dt and dd element children, and dt and dd elements that are children of div element children within a single dl element.

index.html Show resolved Hide resolved
@jongund
Copy link
Contributor Author

jongund commented Jun 20, 2019

I have fixed the outstanding issue and think else before you merge?

@jongund
Copy link
Contributor Author

jongund commented Jun 20, 2019

@jnurthen The PR for association list roles should be ready to merge

@jongund jongund added the Agenda label Jun 27, 2019
@joanmarie joanmarie merged commit b371203 into master Jul 11, 2019
@jnurthen jnurthen deleted the issue504-description-list-roles branch October 14, 2019 21:17
jnurthen added a commit that referenced this pull request Jan 3, 2024
github-actions bot added a commit that referenced this pull request Jan 5, 2024
SHA: 86a5d23
Reason: push, by jnurthen

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants