a11y: replace table-as-layout markup with semantic elements#640
Open
m5x5 wants to merge 1 commit into
Open
Conversation
The outline + data-content panes used <table>/<tr>/<td> structures for
content that wasn't tabular -- predicate/value lists, rdf:List members,
and per-subject blocks. Screen readers announced them as data tables
with rows and columns, which they weren't.
- appendPropertyTRs (manager.js) now emits <dl class="property-list">
with one <dt> per predicate and one <dd> per value, instead of <tr>s
with rowspan tricks for repeated subjects.
- outlineObjectTD / outlinePredicateTD take an optional elementName
argument so callers in non-table contexts (folder-pane list items,
property-list <dd>s) get a plain <div> instead of a stray <td>.
- The object-cell expand affordance is now a native <details>/<summary>
with a lazy 'toggle' listener -- removes a custom expand-icon image
and the associated event wiring.
- rdf:List rendering (Collection branch) switches from
<table class="collectionAsTables"> to <ol class="rdf-collection">
with browser-native marker numbering.
- dataContentPane's per-subject blocks become <section>s with a
<dl class="property-list">; nested bnodes get a .nestedBnode class
instead of being rendered as nested striped tables.
- Fix Graph branch crash: paneRegistry.byName('dataContentPane') is
not a registered name -- use 'dataContents' and fall back to a plain
text node if the lookup still fails.
- Surface swallowed errors: catch sites in manager.js and userInput.js
now console.error(e) in addition to rendering the exception pane,
so DevTools shows the stack trace.
- manager.css: drop margin/border/padding hacks that were applied to
<td>s and are no-ops on <div>/<dd>; add .property-list grid layout
and .rdf-collection / .data-content / .obj-disclosure rules.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
<table>/<tr>/<td>. Screen readers announced them as data tables with rows and columns, which they aren't.appendPropertyTRsnow emits<dl class="property-list">with one<dt>per predicate and one<dd>per value, replacing<tr>s with rowspan tricks for repeated subjects.outlineObjectTD/outlinePredicateTDtake an optionalelementNameargument so callers in non-table contexts (folder-pane list items, property-list<dd>s) get a<div>instead of a stray<td>.<details>/<summary>with a lazytogglelistener — drops the custom expand-icon image and the click wiring around it.rdf:Listrendering (Collection branch) switches from<table class="collectionAsTables">to<ol class="rdf-collection">with the browser's native marker numbering.dataContentPaneper-subject blocks become<section>s with a<dl class="property-list">; nested bnodes get a.nestedBnodeclass instead of being rendered as nested striped tables.paneRegistry.byName('dataContentPane')is not a registered name — use'dataContents'and fall back to a text node if lookup still fails.manager.jsanduserInput.jsnowconsole.error(e)in addition to rendering the exception pane, so DevTools shows the stack trace.Addresses SolidOS/profile-pane#310.
Coordinated PRs
.app-viewto the page-level<main>landmark<main>to<div><main>from ProfileView and EditProfileView<ul>, not a 2-column<table>