E-mail List Archives

Re: Presenting a table without any data


From: Birkir R. Gunnarsson
Date: Feb 21, 2017 7:50PM

You could do two things here as a compromise:
* Use the table cell with text "no records to display" that spans a
whole row, bt make it visually hidden. This is a best practice that
benefits screen eader users, who are the users most likely to be
confused by not finding the table they expect.
* Add aria-controls="the id of the table" (assuming a unique ID can be
added to that table), to the "add" button at the top of the page.
* You can add aria-label="receipts" to the <table>, it is not visible,
so developers should be able to implement it without losing to much

<button aria-controls="receiptsTable">Add</button>
... content
<table id="receiptsTable" aria-label="my receipts">
<tr>header cells</tr>
<tr><td class="visuallyHidden" colspan="number of columns in table>no
receipts to display.</td></tr>

for a receipt. Screen readers who support it will indicate the
programatic relationship between the button and the table, subtle but
it can be very helpful.

On 2/21/17, Meacham, Steve - FSA, Kansas City, MO
< <EMAIL REMOVED> > wrote:
> Thank you, Ryan and everyone for your help.
> In my haste, I may have oversimplified. Here's the exact scenario: A
> master record is created on one page. The user then navigates to this "add
> receipts" page, which has a form to fill out on top with an "add" button,
> and a table at the bottom that accumulates the receipts and presumably
> allows the user to go back and edit or remove them one by one if necessary.
> Presumably they can come back to this page at a later time, after some
> receipts have already been added, and see the table already populated.
> Does that clarify? I've attached a really low-res screen print of what I
> just described. That, BTW, is what I was given to analyze.
> - Steve
> P.S. Oh...they won't use "caption" or "h1"-"h6" elements, either, because
> they're ugly and clutter the page. They prefer to wrap entire portions of
> the page in "fieldset" elements. At a glance, there are even more things
> worse with the page, but for reasons you can probably imagine, they are off
> limits to me for now. I apologize for my blatant frustration.
> -----Original Message-----
> From: WebAIM-Forum [mailto: <EMAIL REMOVED> ] On Behalf
> Of Ryan E. Benson
> Sent: Tuesday, February 21, 2017 5:18 PM
> To: WebAIM Discussion List < <EMAIL REMOVED> >
> Subject: Re: [WebAIM] Presenting a table without any data
> Steve,
> I agree with you providing a header row could be confusing, though I don't
> think many users would jump into the table if they know they need to search
> first. Why not met your devs half-way, and throw "no receipts have been
> added" into a caption tag, which gets removed or updated as the table
> populates
> --
> Ryan E. Benson
> On Tue, Feb 21, 2017 at 5:42 PM, Meacham, Steve - FSA, Kansas City, MO <
> <EMAIL REMOVED> > wrote:
>> Imagine you have a dynamic web page that retrieves a list of receipts,
>> but none matched the query. Or, imagine one that is a data entry page
>> on the top, and at the bottom is table that displays them as they are
>> added, but you start out with none.
>> I've advised my developers that displaying only the single header row
>> is inappropriate; that there are several ways this could be
>> disorienting or cryptic, such as a user wondering if it is proper
>> behavior or simply something that was done in such a way as to be
>> inaccessible to them. Or, wondering what their path forward should be.
>> There are more.
>> So, I told them when there are no records to display to add a single
>> row that makes that says something like "No receipts have been added"
>> that spans an entire table row. It goes away once there are rows of
>> actual data to display.
>> So my question is: Am I just being overwrought? They're argument is
>> that this is unnecessary "dummy text" that will confuse their users.
>> My other question is: If I'm not out of line, then how could I justify
>> it to them? They've escalated it to senior management who are now
>> second guessing my guidance. They want to see something official that
>> says they are supposed to do it this way.
>> Please help...
>> Steven Meacham, ICT Accessibility Program Manager
>> +1 (816) 926-1942<tel:+18169261942>
>> FSA Section 508 Program<https://wiki.tools.fsa.usda.gov/x/AgCoAw>
>> This electronic message contains information generated by the USDA
>> solely for the intended recipients. Any unauthorized interception of
>> this message or the use or disclosure of the information it contains
>> may violate the law and subject the violator to civil or criminal
>> penalties. If you believe you have received this message in error,
>> please notify the sender and delete the email immediately.
>> >> >> archives at http://webaim.org/discussion/archives
>> >>
> > > http://webaim.org/discussion/archives
> > > > > >

Work hard. Have fun. Make history.