-
Notifications
You must be signed in to change notification settings - Fork 15
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
Mapping tables script is creating id="undefined" on summary elements #7
Comments
Only just took a quick peek, but from what I can tell, HTML-AAM and CORE-AAM and SVG-AAM are all using the identical mapping-tables.js (albeit at different locations). But I also noticed that something appears to be stripping the |
Added a tracking link in Graphics-AAM: this affects the CR build published last month. |
@jasonkiss Are you able to review PR #9 by @kevinpeno, to see if it takes care of the issue without introducing any new ones? |
I've looked at PR #9 and don't think it addresses this issue. One thing I don't understand is how the respec snapshot contains the mapping |
I've tried to review this again, but I am no longer able to duplicate locally when testing against the w3c/core-aam repo's master branch. |
In the mapping-tables.js script, there is the following code at the end: if (respecEvents) {
// Fix the scroll-to-fragID:
// - if running with ReSpec, do not invoke the mapping tables script until
// ReSpec executes its own scroll-to-fragID.
// - if running on a published document (no ReSpec), invoke the mapping tables
// script on document ready.
respecEvents.sub("start", function (details) {
if (details === "core/location-hash") {
mappingTables();
}
});
// Subscribe to ReSpec "save" message to set the mapping tables to
// view-as-single-table state.
respecEvents.sub("save", function (details) {
mappingTableInfos.forEach(function (item) {
viewAsSingleTable (item);
});
});
} else {
mappingTables();
} However, while I can confirm that respecEvents is being passed through, it's not clear to me that the "save" event is registering and triggering the viewAsSingleTable() prior to exporting the static respec snapshot. If that did work, it would solve the issue. Do we know if this is the right approach with RespecEvents? |
The details elements have the |
Yes, thanks! I should have noticed that.
That could be. But I'm unable to confirm via alert or console.log that the "save" event is even getting through to the mapping-tables script. If we can't get the "save" event and viewAsSingleTable() switch to happen as intended, another option is to not remove the |
Could we use the "end" event here? In my brief testing it appears to work.... |
@jnurthen is this still on your todo or can I take over? |
Go for it.
|
Thank-you, @ZoeBijl ! |
@ZoeBijl @jnurthen I could really use a fix for this, so that whatwg/html#3282 can be resolved with working links into the published version of the HTML-AAM spec instead of a temporary work-around of linking into the editor's draft. If I understand correctly from the thread on the ARIA editors mailing list, this is at present a manual process that is prone to error. The following info may be helpful:
From @jasonkiss:
@marcoscaceres has offered ReSpec help:
|
I have not forgotten this one. Will fix after I get aria-practices #1228 fixed. |
Hi @ZoeBijl! Note that what I thought was a "temporary work-around of linking into the editor's draft" for the fix for whatwg/html#3282 turned out to be exactly what the HTML editors wanted. Linking to the editor's draft fits the "Living Standard" model. :) So, while Thanks! |
HTML AAM can't properly link to Core AAM due to this as well. related: seems like it might be worth dropping jquery.details.min.js as well, unless we need to support IE11? |
A bug in the script that converts the role mapping tables into summary/details means that the
id
of the summary elements are all being set toundefined
.In addition to being just invalid HTML, this breaks links, since those were the
id
that are used as hash references (and they need to be theid
used as hash references, so that the browser will auto-expand the corresponding details when the summary is targetted). This makes it a blocking issue for SVG-AAM republication.My best guess is it was introduced here:
bc45948
@jasonkiss, are you able to take a look?
Tracking issue for Core-AAM: w3c/core-aam#5
I'll also make a tracking issue in SVG-AAM, since I acquired the bug when I synced all the common files last week. HTML-AAM isn't currently affected. I'm not sure if there are any other specs that use the script.
The text was updated successfully, but these errors were encountered: