This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 22970 - style AT API constants in IA2/ATK columns
Summary: style AT API constants in IA2/ATK columns
Status: NEW
Alias: None
Product: HTML WG
Classification: Unclassified
Component: HTML a11y APIs (editor: Steve Faulkner, Cynthia Shelly) (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: alexander surkov
QA Contact: HTML a11y API spec bugbot
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-15 15:28 UTC by alexander surkov
Modified: 2013-08-23 15:45 UTC (History)
5 users (show)

See Also:


Attachments

Description alexander surkov 2013-08-15 15:28:05 UTC
What is the current style? <em>constant</em>, correct?
Comment 1 Jason Kiss 2013-08-16 01:59:38 UTC
I'm not sure I follow.
Comment 2 alexander surkov 2013-08-16 02:20:15 UTC
I meant to have a proper styling for constants like the text

IA2_RELATION_LABEL_FOR to form control element pointed by for attribute

can be styled like

<span class="constant">IA2_RELATION_LABEL_FOR</span> to form control element pointed by <span class="attr">for</span> attribute

instead of spans we could use <code>, <em> or whatever else that fits
Comment 3 alexander surkov 2013-08-20 15:41:34 UTC
Jason, ping?
Comment 4 Jason Kiss 2013-08-21 05:08:36 UTC
We've been using <code> to wrap element and attribute names. The ARIA UAIG uses <code> for constants. I suggest we do the same. I don't think we need @class, though.
Comment 5 alexander surkov 2013-08-21 12:18:44 UTC
I noticed some constants/references are links (in attributes area). So if we do all of them links then probably it's good idea to have a links map and generate links by js like

//js

var referencesMap = {
  "ia2:rel:labelled_by": url
};

var links = document.querySelector("a[rel]");
for (var i = 0; i < links.lenght; i++)
  links[i].setAttribute("href", referencesMap[links[i].getAttribute("rel"));
}

// html

<a rel="ia2:rel:labelled_by">IA2_RELATION_LABELLEDBY</a>

// css

a[rel] {
  font-style: monospace;
}

it allows us to keep code nicer and lesser (less chance for mistakes) and change the url in one place if the URL is changed
Comment 6 Jason Kiss 2013-08-22 01:37:14 UTC
(In reply to comment #5)
> I noticed some constants/references are links (in attributes area). 

I don't think we should link the constants. Makes it a little too noisy, IMO. 

The table column headers each link to the relevant API documentation and from there it should be easy enough for a user to find the constant they are looking to know more about.

The table column header links should be updated/corrected in a few cases.

We can also add clear links to the APIs (with separate links to role and state constants, etc.) in the introduction section.
Comment 7 alexander surkov 2013-08-23 15:45:38 UTC
different types of constants can be selected:
1) HTML elements/attrs that don't need a reference like "when the <code>label</code> element has for attribute" in label element description
2) WAI ARIA roles, props, etc
3) AT API constants like RELATION_LABEL_FOR or STATE_LINKED
4) string constants like action "open"/"close" or "font-style" text attribute (may be considered as part of 3d item
5) interfaces names like IAccessibleHyperText2 (might be part of 3d item).
6) AT API methods/arguments name like IAccessible::name

Is it ok if:
1st item is red colored code
2-5 items are just ordinal code
6 is either ordinal code or link