recommended attribute use in hierarchies?

I have some newby questions on recommended attribute use in hierarchies.
Although I'm quite willing to generate any number of tags and attributes,
I'd rather not do so without understanding the reasons.

# Background

I'd like the widest possible range of screen readers to respond properly
to hierarchical content (eg, nested lists, headings).  Ideally, the user
should be able to determine the current level, navigate easily between
items, etc.

When I read this page:

  "ARIA in HTML"
  https://specs.webplatform.org/html-aria/webspecs/master

I get the impression that UL, LI, H1-H6 tags already supply all the needed
information and that I shouldn't add ARIA attributes such as aria-level=1,
role='list', role='listitem', and role='heading'.  That is, no additional
attributes are either needed or desirable.

However, when I look at this example:

  "File Directory Treeview Example Using Declared Properties" 
  https://www.w3.org/TR/wai-aria-practices-1.1/examples/treeview/treeview-1/treeview-1b.html

I see several ARIA attributes being used in UL and LI elements:

- roles: group, tree, treeitem
- properties: aria-label, aria-level, aria-posinset, aria-setsize, tabindex
- states: aria-expanded

So, I'm quite confused about which attributes I should be including.  To
clarify, I'm happy to include any and all attributes which could be useful:

- I'll be generating the attributes mechanically.
- Bandwidth is unlikely to be an issue.

# Questions

Q: If I'm just generating static headings and lists, what attributes should
   I be including (and why)?

Q: If the example referenced above uses additional attributes, what is the
   reason for this?

-r

 -- 
http://www.cfcl.com/rdm           Rich Morin           rdm@cfcl.com
http://www.cfcl.com/rdm/resume    San Bruno, CA, USA   +1 650-873-7841

Software system design, development, and documentation

Received on Sunday, 5 February 2017 19:43:12 UTC