HI, my issue can sound strange, but I'd like (for accessibility reasons), to move the Calendar Navigation in the TABLE created by calendar itself.
What I'm trying to realize is, for mini-calendar, to have a code like what Wordpress already prints for its calendars:

	<table id="wp-calendar" summary="Calendar">
	<caption>January 2007</caption>

	<thead>
	<tr>
		<th abbr="Monday" scope="col" title="Monday">M</th>
		<th abbr="Tuesday" scope="col" title="Tuesday">T</th>
		<th abbr="Wednesday" scope="col" title="Wednesday">W</th>
		<th abbr="Thursday" scope="col" title="Thursday">T</th>
		<th abbr="Friday" scope="col" title="Friday">F</th>

		<th abbr="Saturday" scope="col" title="Saturday">S</th>
		<th abbr="Sunday" scope="col" title="Sunday">S</th>
	</tr>
	</thead>

	<tfoot>
	<tr>
		<td colspan="3" id="prev" class="pad">&nbsp;</td>

		<td class="pad">&nbsp;</td>
		<td colspan="3" id="next" class="pad">&nbsp;</td>
	</tr>
	</tfoot>

	<tbody>
[...]

I've been able to:
- print correct and accessible table headers (see: #373356: Improving Semantics for Calendar Views to Improve Accessibility)
- provide a "summary" element for table (configurable in the Attachment settings)

but I don't know how to override default Calendar Navigation with an accessible (new) one..
Any thoughts? Regards

Comments

mgifford’s picture

Issue tags: +Accessibility

Can you define the accessibility rationalle for the move?

thepanz’s picture

I mean that we could have the navigation inside the TABLE caption, resulting in a more accessible code/page also for readers.
But... maybe this is the wrong way... any thoughts?

mgifford’s picture

I'm not sure, but it's worth bringing up here - http://groups.drupal.org/accessibility

I generally look for examples, standards & use cases.

thepanz’s picture

I just joined Accessibility group! :) I'll post this issue there, also with #373356: Improving Semantics for Calendar Views to Improve Accessibility.

BTW: my use-case is what I found here: http://georgiatechcatea.wordpress.com/2007/01/16/accessible-calendars-fo...
And the HTML outputted (IMHO accessible) by Wordpress mini-calendar plugin. I know that we're Drupal here... but if they do it better, why can't we? ;)

Regards

mgifford’s picture

Thanks for adding the accessibility tag to issue #373356.

I'm totally keen on leapfrogging off of other open source CMS solutions. WordPress is popular and has keen bloggers who use it well. Great to use solutions that have been tried & tested there and then work to improve upon them in Drupal.

So, for WCAG 2.0 the closest reference would be http://www.w3.org/TR/WCAG-TECHS/H73.html

The example here is pretty boring, but might be closer to the full month view (which we'll also need to address) - http://www.catea.gatech.edu/scripts/calendar.html

Thanks for joining the Accessibility group. Look forward to your other contributions.

karens’s picture

Status: Active » Closed (won't fix)

There is no easy way to do this. The navigation is one view, the calendar is a different view, so there are no themes or handlers that can access both of them. Views outputs attachments before it processes the pages they are attached to, so they are totally separate (the navigation is the 'page' and the calendar is an attachment). It would take a complete redesign of the code to do this, not a trival task.

Sorry!

If it's critically important someone can try to make a patch, but it would probably be very difficult to find a way, especially a way that doesn't create a spaghetti mess of unmaintainable code.

mgifford’s picture

Status: Closed (won't fix) » Active

It's quite the mass of code I must say. Hadn't really dug into the Calendar module before. And yes, this is certainly going to be larger than making a modification to a theme.

Just because there's no easy way to do this, doesn't mean that it can't be done, but it certainly is clear that you need the community to step forward and propose something that would be workable.

I'm partly wondering if Views needs to be extended (but more likely I just haven't got my head around it yet).

So looking at function calendar_week_header() one would think we could insert a title or or abbr attribute into the array and hopefully get that brought into the table when it is created. Unfortunately, my trial efforts didn't seem to be successful:

    $row[] = array('header' => TRUE, 'class' => "days ". $day, 'abbr' => 'wow', 'title' => 'righton', 'data' => $label);

I wasn't looking for ore than a hello world kinda response here. However, didn't get anything.

I was pointed to a jQuery approach being used to add accessibility to WordPress here - http://core.trac.wordpress.org/ticket/9408

This might work to just apply the appropriate tags to the calendar when the javascript is loaded. A bit harsh, but could be done.

I really don't think that having an accessible calendar is really something that we can opt out of as a community. Should we tell folks that if this is a requirement that they have to go to use WordPress - http://georgiatechcatea.wordpress.com/2007/01/16/accessible-calendars-fo...

Not easy, sure.

Not entirely within the scope of this module, possibly.

but won't fix seems a bit harsh.

Mike

karens’s picture

First of all, I'm not sure I agree the calendar does not qualify as accessible just because the navigation isn't inside the table.

But if someone wants to find a way to fix it that's great.

One idea to play around with is creating the navigation inside the table by embedding a view of the navigation into the table. Or, because the navigation is actually the main view, create the table by embedding the calendar view into the navigation instead of attaching it. That puts all the parts into the same theme. That would still require a lot of refactoring of the code, but would probably be the most workable solution that doesn't require changes to the way Views works.

karens’s picture

BTW, reading through the links above, the navigation is not the accessibility problem, we just need to add information to the row and column headers, which is totally doable without messing around with the problems getting the navigation into the same view.

If that's what everyone really wants, that should be an easy fix.

karens’s picture

Doh. OK I see that they have a 'next' link in the header, now I'm with you. Sorry! I was not reading this carefully enough.

We we can start by getting the column and row headers in there. To get the information needed for the 'next' and 'prev' link we just need to use some of the same functions used to create the navigation, we don't actually have to MOVE the navigation into the table.

mgifford’s picture

That's my understanding Karen. Thanks for looking into this. thePanz any further clarification needed?

Will be great to have more accessible calendars for sure.

Karen, if you want to have someone test the calendar who uses a screen reader, please let me know. I can try to track down a screen reader.

Mike

thepanz’s picture

I'm happy that something is moving! :)

I'm open for testing, improving calendar/date accessibility (like my #423710: More accessible date navigation issue) or other suggestions.. :)

@Mike, your comment #7, try my #373356: Improving Semantics for Calendar Views to Improve Accessibility patch (maybe It needs further fixes), but does what you were trying to do.

arlinsandbulte’s picture

BUMP:
Any traction here? or is this stalled?

mgifford’s picture

Thoughts on D7?

mgifford’s picture

Version: 6.x-2.x-dev » 7.x-3.x-dev
Issue summary: View changes
mgifford’s picture

Status: Active » Closed (won't fix)

I'm going to close this issue until there is a clear example where moving the navigation into the table actually improves things for users of assistive technology. Existing links don't verify this actually makes a difference.