<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>AlastairC &#187; WYSIWYG editors</title>
	<atom:link href="http://alastairc.ac/category/wysiwyg-editors/feed/" rel="self" type="application/rss+xml" />
	<link>http://alastairc.ac</link>
	<description>Kything web interactions</description>
	<lastBuildDate>Fri, 23 Jul 2010 18:06:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Removing empty HTML tags from TinyMCE</title>
		<link>http://alastairc.ac/2010/03/removing-emtpy-html-tags-from-tinymce/</link>
		<comments>http://alastairc.ac/2010/03/removing-emtpy-html-tags-from-tinymce/#comments</comments>
		<pubDate>Mon, 29 Mar 2010 14:53:24 +0000</pubDate>
		<dc:creator>AlastairC</dc:creator>
				<category><![CDATA[Front-end code]]></category>
		<category><![CDATA[WYSIWYG editors]]></category>

		<guid isPermaLink="false">http://alastairc.ac/?p=609</guid>
		<description><![CDATA[A little post for those that run into the same problem I had with TinyMCE and blank instances not quite being blank. I created a little configuration to remove empty HTML tags.]]></description>
			<content:encoded><![CDATA[<p>A little post for those that run into the same problem I had with TinyMCE and blank instances not quite being blank. I created a little configuration to remove empty HTML tags.</p>
<p>If you have an editable box with TinyMCE, and that box will appear on the website if it contains content, sometimes you can get a &#8216;blank&#8217; box. When a user deletes content from the box, they might not delete everything in the box, leaving some blank HTML tags.</p>
<p>For example, if there was a list of links, and you use the mouse to select the list, and press delete, it can leave either <code>&lt;ul&gt;&lt;/ul&gt;</code>, or <code>&lt;ul&gt;&lt;li&gt;&lt;/li&gt;&lt;/ul&gt;</code> depending on the browser.</p>
<p>In our CMS, when that went through to the front-end page the HTML content meant the box was displayed, but without visible content.</p>
<p>I messed around with some of the <a href="http://wiki.moxiecode.com/index.php/TinyMCE:API/tinymce.Editor#Events">TinyMCE API events</a>, ruling out onSaveContent and onSubmit.</p>
<p>The key event was <a href="http://wiki.moxiecode.com/index.php/TinyMCE:API/tinymce.Editor/onPostProcess">onPostProcess</a>, which allows you to run a script on the content before it is submitted.</p>
<p>Combine that with a little script from Stackoverflow to <a href="http://stackoverflow.com/questions/822452/strip-html-from-text-javascript#answer-822486">strip HTML from text with JavaScript</a>, and you get:</p>
<pre><code>tinyMCE.init({
   ... // other settings here
    setup : function(ed) {
    // If there is no text content, return nothing.
    //   NB: Image-only content would get swallowed.
      ed.onPostProcess.add(function(ed, o) {
            var text = "";
            var tmp = document.createElement("DIV");

            tmp.innerHTML = o.content;
            //console.debug("inner html=" + tmp.innerHTML);

            if (tmp.innerHTML) {
               text = tmp.textContent||tmp.innerText||"";
               text = text.replace(/\n/gi, "");
               text = text.replace(/\s/g, "");
               text = text.replace(/\t/g, "");
               //console.debug("if content, text=" + text);
            } else {
                text = "";
                //console.debug("else no content, and typeof =" + typeof(text));
            }
            if (text == "") {
                o.content = text;
                //console.debug("content set, possibly, get content = " + o.content);
            }

      });
   } // add comma here if there's another thing in the list
});</code></pre>
<p>The only weakness I know of in that, is that something containing only an image but no text would return a blank box. I left the console logging in (but commented) if you&#8217;d like to see what happens though Firebug.</p>
<p>Free free to use this or to feedback any improvements below.</p>
]]></content:encoded>
			<wfw:commentRss>http://alastairc.ac/2010/03/removing-emtpy-html-tags-from-tinymce/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SharePoint 2010 Accessibility Event</title>
		<link>http://alastairc.ac/2009/11/sharepoint-2010-accessibility-event/</link>
		<comments>http://alastairc.ac/2009/11/sharepoint-2010-accessibility-event/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 20:34:55 +0000</pubDate>
		<dc:creator>AlastairC</dc:creator>
				<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[WYSIWYG editors]]></category>
		<category><![CDATA[sharepoint]]></category>

		<guid isPermaLink="false">http://alastairc.ac/?p=584</guid>
		<description><![CDATA[<img class="alignleft size-thumbnail wp-image-587" title="The roundtable discussion at the end of HiSoftware's event." src="/wp-content/uploads/2009/11/hisoft-event-150x112.jpg" alt="The roundtable discussion at the end of HiSoftware's event." width="150" height="112" />The "UK Accessibility Roundtable for Microsoft Office SharePoint Server 2010", a HiSoftware event at Microsoft's offices in London Victoria. The day revolved around several demos of SharePoint 2010 and Compliance Sheriff, and was fleshed it out with some quite good accessibility information. These are my notes on the event, with a lot of interspersed commentary.]]></description>
			<content:encoded><![CDATA[<p><a href="/wp-content/uploads/2009/11/hisoft-event.jpg"><img class="alignleft size-thumbnail wp-image-587" title="The roundtable discussion at the end of HiSoftware's event." src="http://alastairc.ac/wp-content/uploads/2009/11/hisoft-event-150x112.jpg" alt="The roundtable discussion at the end of HiSoftware's event." width="150" height="112" /></a>The official title was &#8220;UK Accessibility Roundtable for Microsoft Office SharePoint Server 2010&#8243;, and was a <a href="http://www.hisoftware.com/events/uksp2010roundtable.htm">HiSoftware event</a> at <a href="http://www.microsoft.com/">Microsoft</a>&#8216;s offices in London Victoria. HiSoftware produce compliance monitoring software for developing and maintaining sites to prevent accessibility, privacy, quality and security issues. The day revolved around several demos of <a href="http://sharepoint2010.microsoft.com/">SharePoint 2010</a> (SP 2010) and <a href="http://www.hisoftware.com/products/compliancesheriffoverview.htm">Compliance Sheriff™</a>, and fleshed it out with some quite reasonable accessibility information. These are <strong>my notes</strong> on the event, with a lot of interspersed commentary. I&#8217;m sorry they are so long, but there was a lot of interesting things said!</p>
<h2>SharePoint 2007 Landscape</h2>
<p>After a quick introduction from Nick Wilson (Managing Director of HiSoftware EMEA), Thomas Logan (HiSoftware VP of Product Management) took a look at the current situation with SharePoint 2007 (SP 2007).</p>
<p>The first point was stating the obvious, but just so everyone knows, Microsoft has been one of the more honest CMS vendors saying SharePoint is <q>Not accessible to a particular standard</q>. Well, to any standard really!</p>
<p>HiSoftware&#8217;s Accessibility Kit for SharePoint (AKS) is intended to repair issues with out of the box SharePoint, and also included an accessible Rich Text Editor (RTE).</p>
<p>Thomas demonstrated some of the improvements that the AKS could help with:</p>
<ul>
<li>SharePoint 2007 doesn&#8217;t allow text resizing (in Internet Explorer). When using AKS and the text can be increased, and it does actually change. However, from where I was sitting it increased by about 30%!? I know IE has some bugs with EMs, but the size really didn&#8217;t change very much.</li>
<li>Thomas went on to show a form where you&#8217;re able to add explicit labels to inputs (not possible in SP 2007 in some situations).</li>
<li>Quick demo of the Accessible RTE (aRTE), navigating in the editor with keyboard, apparently this <q>uses ARIA concepts</q>.</li>
</ul>
<h2>WCAG 2 &amp; ARIA</h2>
<p>Thomas called the Web Content Accessibility Guidelines (WCAG) version 2 the <q>new global standard</q> (although really it&#8217;s guidelines, not a standard).</p>
<p>Thomas notes:</p>
<ul>
<li>There is now a heavier reliance on manual testing (despite the W3C&#8217;s aim that WCAG 2 be <q title="WCAG 2 FAQ" cite="http://www.w3.org/WAI/WCAG20/wcag2faq.html#different">more precisely testable with automated testing</q>.)</li>
<li>There is a different and more complicated lexicon on information design techniques.</li>
<li>Frequently overlapping requirements (e.g. forms have things that need to be perceivable/operable etc.)</li>
</ul>
<p>The presentation showed a spider diagram of principles / guidelines / success criteria / techniques, commenting on how it is a bit of a web of things you need to know. I quite agree with the point that when testing or developing, the sufficient techniques would be better listed by functionality type, however, that isn&#8217;t the intent of the core guidelines.</p>
<h3>Web accessibility timeline</h3>
<p>Thomas showed a diagram of (legally) important milestones in accessibility:</p>
<ol>
<li>WCAG 1 (1999)</li>
<li>Section 508 (2000)</li>
<li>JIS x8341-1 + other standards</li>
<li>Section 508 refresh (2008)</li>
<li>WCAG 2 (2008)</li>
<li> New Zealand adopts WCAG 2 and EU recommends WCAG 2</li>
</ol>
<p>NB: HiSoftware have a CD with lots of white papers on laws, regulations, standards and settlement agreements, get in touch with them for a copy.</p>
<p>Apparently a Judge in New York used WCAG 2 (double-A) as the standard that should be met, rather than section 508. I&#8217;m not sure if this is a reasonable comparison? If the company in question are a private company then the ADA legislation (using WCAG 2 as a benchmark) would be applicable rather than Section 508. It&#8217;s funny how the procurement guidelines (Section 508) are more widely known than the more general law. (Struan Robertson points out the <a href="http://www.out-law.com/page-9389">ambiguity of the ADA</a>.)</p>
<p>The next slide was a diagram with national standards as a circle inside the larger WCAG 2. I suspect it would be more accurate to show standards such as <a href="http://www.bsigroup.com/en/Standards-and-Publications/How-we-can-help-you/Consumers/Accessibilty-day/BS-8878-form/Thank-you/">BSI 8878</a> stacked on top of WCAG 2, building on the guidelines.</p>
<h3>Testing best practices</h3>
<p>Thomas provided some good advice on testing a SharePoint site from HiSoftware&#8217;s point of view. (However, I wish people wouldn&#8217;t refer to <q>Meeting double-A regulation</q>!)</p>
<ul>
<li>Start with most common issues, page templates and style sheets. (Thomas talked about the <q>blessed way</q> of web development being the CSS way.)</li>
<li>Focus on key scenarios/pages.</li>
<li>Group related manual test work (i.e. by function rather than by guideline/principle)</li>
<li>Document work to demonstrate progress.</li>
<li>Use a representative page from each template.</li>
</ul>
<p>Something that came across more from the words than the presentation was that it&#8217;s an uphill battle. Comments like <q>I&#8217;d always like to be 100% complaint, but there&#8217;s usually something that can be done better</q>, and comments from an Microsoft Partner later gave a good indication that you really had to pick your battles. My conclusion from the tone would be that a SharePoint 2007 site as a whole was virtually impossible to make fully accessible.</p>
<h3>Managing Compliance</h3>
<p>Next was a slide with a Venn diagram of automation / documentation / remediation, to manage compliance.</p>
<p>There was a very fundamental point missing though: <strong>prevention</strong>.</p>
<p>The whole presentation and tone of the day was about fixing things, because we can&#8217;t trust people to maintain accessibility.<br />
I agree that regular people (content authors) aren&#8217;t going to learn about accessibility, but so what? There are simple things you can do to a CMS interface to prevent problems in the first place.</p>
<p>Still, the event is organised / sponsored by a company who makes compliance management software, so I guess that&#8217;s to be expected.</p>
<h3>ARIA (and JavaScript required?)</h3>
<p>Thomas gave a pretty good (and practical) overview of the <a href="http://www.w3.org/WAI/intro/aria.php">WAI-ARIA spec</a> being used in practice. Some people might have found it a bit technical, but it is necessary to know a little about ARIA in order to understand how &amp; why the interface for SharePoint 2010 is accessible.</p>
<p>I won&#8217;t go through the rest of the content on ARIA, there are good <a href="http://www.w3.org/TR/wai-aria-primer/">ARIA introductions</a> elsewhere. However, that&#8217;s a pretty fundamental point to think about, SP 2010 was built <strong>targeting WCAG 2</strong>, and <strong>relies on ARIA</strong> to implement accessibility (and therefore I would assume it relies on JavaScript).</p>
<p>I <em>assume</em> this applies to the editing / collaboration features rather than the &#8216;content consumers&#8217; type user.</p>
<p>Personally, given SharePoints product development timelines (3/4 years between versions) I would have made the same decision. Someone in the audience pointed out that not everyone can use the latest screen readers or browsers, and asked what the baseline for SharePoint 2010 was.</p>
<p>Looking at the whole situation in general, there is going to be a bit of<strong> a gap</strong> for a while, as developers implement sites that require JavaScript and ARIA, and Access Technology (AT) vendors implement support for ARIA. If you are in charge of a mass-market or public sector site, then you should probably make sure the front-end site doesn&#8217;t require JavaScript or ARIA. However, until people do implement sites using ARIA, the AT vendors won&#8217;t make it a priority.</p>
<p>The accessibility community as a whole needs to realise the implicit decision about which option is better long term:</p>
<ol>
<li>Make sure pages / applications work without JavaScript.</li>
<li>Make sure that the JavaScript works with Assistive Technologies (with a baseline of WAI-ARIA).</li>
</ol>
<p>These are not mutually exclusive, however, in practice they will be because of the effort required to do both.<br />
I firmly believe that the experience for someone using Access Technology should be as close to the mainstream as possible, otherwise developers will overlook issues that affect a minority audience.</p>
<p>Thomas also noted that keyboard access is important, including documenting the features available. I wonder whether SharePoint has (or can) avoid the cross-platform and AT issues with conflicting keyboard commands?</p>
<h3>Resources</h3>
<p>Thomas showed some good resources that I&#8217;ll be digging into:</p>
<p>The <a href="http://dev.aol.com/dhtml_style_guide">DHTML Style Guide</a> is apparently very helpful for people trying to implement accessible JavaScript, and should help harmonise things across sites.<br />
Thomas also recommend AOL&#8217;s <a href="http://dev.aol.com/axs">AXS library</a>, which can automatically associate keyboard commands to mouse commands.</p>
<p>See also <a href="http://codetalks.org/">codetalks.org</a> and search for ARIA test cases.</p>
<p>A work around demonstrated how to use ARIA to mark layout tables with a role of &#8216;presentation&#8217;. However, that really feels to me like solving the wrong problem.</p>
<p>A demo was going to be the next thing, but network issues got in the way. Thomas did recommend the <a href="https://addons.mozilla.org/en-US/firefox/addon/9108">Juicy Studio toolbar</a> for things like showing where the document landmarks are. JAWs and NVDA have keyboard shortcuts for showing landmarks, other access technologies should follow soon.</p>
<p>A quick tip was that you can have more than one landmark of the same type, but it needs a unique title /ID.</p>
<h2>SharePoint 2010</h2>
<p>The next section was presented by Tara Hellier, SharePoint Partner technology Advisor, Microsoft UK. (NB: Tara talked relatively quickly, which is good for an engaging presentation, but I may not have got everything down, sorry!)</p>
<p>Tara started off saying that Microsoft (MS) are aware of many issues in 2007. They had to make a decision, adapt it in a large and disruptive way for the 2007 version, or work it into the next one. The decision was to focus on accessibility in the 2010 version.</p>
<h3>Goals</h3>
<p>The standards (or guidelines) being aiming for in SP 2010 are:</p>
<ul>
<li>WCAG 2 AA (again, the terminology is about <q>Compliance</q> grrr.)</li>
<li>Section 508 + <abbr title="Voluntary Product Accessibility Template">VPAT</abbr>s. Tara said that Microsoft have released some of these self-assessment statement, however, I can only find this <a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=a0236224-f9f1-4b8e-8cd8-89ed967d031e#tm">VPAT on POS 2009</a>.</li>
</ul>
<p>Some of the goals for SharePoint 2010 were:</p>
<ul>
<li>Make is usable, understandable etc. (i.e. not just technically accessible)</li>
<li>Make use of &#8220;Classic&#8221; accessibility:
<ul>
<li>HTML input fields</li>
<li>Labels</li>
<li>Headings (<q>every bit of content has a header</q>, I hope that doesn&#8217;t mean over-kill?)</li>
<li>Skip links for repetitive content</li>
<li>Shortcut keys (Uh-oh)</li>
<li>The <q>More accessible mode</q> has been kept, apparently for  <q>future-proofing</q>. MS test SharePoint with  a lot of ATs, but aren&#8217;t sure  where they are going in future. (I would have thought that this would actually be for backwards compatibility more than future proofing?)</li>
</ul>
</li>
<li>Use WAI ARIA, as the semantics for dynamic content.</li>
<li>Markup: Use an XHTML 1.0 strict doctype, with the emphasis on well-formed (rather than valid). Tara said that it&#8217;s very difficult to be valid, the product team were going for clean, usable code, and to support ARIA it couldn&#8217;t have been valid. To me, this seems to be a bit of mis-direction, I suspect there will be a lot of SharePoint specific attributes (perhaps even tags) that are automatically added.</li>
<li><q>No more Quirks</q>
<ul>
<li>Adopted CSS standards for master pages.</li>
<li>Reduce tables (I did note some in a later demo)</li>
<li>Improve cross-browser support. IE 7+, FF 3, and working on Safari 3.x (how about 4.x?). No mention of Chrome / Opera.</li>
</ul>
</li>
</ul>
<p>It&#8217;s interesting that they are using the XHTML strict doctype, because that&#8217;s likely to make supporting IE6 on the front-end website a little trickier, at least in my experience.</p>
<h3>Keyboard shortcuts</h3>
<p>The interface is taking a great deal from Office 2007&#8242;s ribbon. It has contextual menus, with keyboard shortcuts for the Ribbon keyboard shortcuts, e.g.</p>
<ul>
<li><kbd>cntl</kbd> + <kbd>[</kbd> to Jump to tabs</li>
<li><kbd>cntl</kbd> + <kbd>[</kbd> Jump to last command</li>
<li><kbd>cntl</kbd> or <kbd>shift</kbd> + arrow keys to jump between groups.</li>
</ul>
<p>There are also other keyboard shortcuts (Accesskeys?), including S for search and W for welcome. Unfortunately I missed the others. It is a bit worrying, unless I'm missing something these could clash horribly with some access technologies.</p>
<p>ARIA is used around the ribbon, for notifications, text editing, grid editing, rich forms, dialogs etc. In regard to text-editing Tara mentioned something about it being wiki-like, but I wasn't sure if this refered to mark-down editing (unlikely) or something else.</p>
<p>Infopath is an associated product that is used for creating forms, and ARIA semantics has been used for the forms.<br />
Uploading a document now includes aria attributes. (Meaning it's not a standard browser dialogue I assume?)</p>
<p>Tara did a quick demo, and I think this was the first time most people had seen SP 2010.<br />
It has <q>Lost the 'charming blue interface'</q>, and the top left has a site actions and ribbon interface. The ribbon is contextual, depending on what's on the page, and (I think) what is focused upon within the page.</p>
<p>You can just click to edit and add text, and then you have the ribbon for the editing controls.</p>
<p>The immediate accessibility issue I noted was the priority given to the font-based styling instead of using structured markup. It's the same in Word 2007, because the styles are hidden away, it's makes it much less likely people will use semantic markup like headings. I couldn't see from the interface how you would add a heading!</p>
<p><a href="/wp-content/uploads/2009/11/sharepoint-interface1.png"><img class="aligncenter size-full wp-image-586" title="SharePoint default editing interface." src="http://alastairc.ac/wp-content/uploads/2009/11/sharepoint-interface1.png" alt="SharePoint default editing interface." width="600" height="353" /></a></p>
<p>(Picture taken from the <a href="http://sharepoint2010.microsoft.com/Pages/videos.aspx">SharePoint 2010 site</a>.)</p>
<p>I'll provide some feedback even before the beta: please <em>please</em> include an option to give semantic elements priority and remove things like font-size / color etc. I've written many articles on the <a href="http://alastairc.ac/category/wysiwyg-editors/">accessibility of WYSIWYG editors</a>, just start there...</p>
<p>The menu includes tooltips, and <a href="http://www.linkedin.com/pub/graeme-whippy/0/617/a37">Graeme Whippy</a> of Lloyds TSB asked if they are available to keyboard users, which Tara wasn't sure about.</p>
<p>Then someone behind me asked if they could install JAWs on the laptop so that they could try it. Now, I can understand some frustration at this stage if you can't see the presentation. However, the question was asked fairly aggressively, and it wasn't something that Tara had control over. No-one was going to get to try it out today, which is partly why much of the presentation was based on screen shots. The issue really came down to 'audio description', I think Tara is new to the accessibility world and wasn't used to describing her slides. (That takes some practice, I still miss things off.)</p>
<p>There was another question along the lines of "Can you add an image using the keyboard" which Tara wasn't prepared for. I didn't think about it at the time, but the keyboard short-cuts above are exactly how you would do that!</p>
<p>The real answer to these questions was that there will be a public beta of SharePoint 2010 which will be available very soon. It's not exactly easy for most people there to install any version of SharePoint, so Nick at HiSoftware will try to create a test environment and AbilityNet are looking to host clinics to work through the issues.</p>
<p>The call to action was: please try it out and feedback to Microsoft.</p>
<h2>"Web Content Creates Risk"</h2>
<p>Thomas again, talking about and demoing HiSoftware's products, which cover privacy, accessibility, social media &amp; collaboration, brand 'corruption', and security breaches.</p>
<p>I'll skip the first bit, see <a href="http://www.hisoftware.com/products/compliancesheriffoverview.htm">HiSoftware's site</a> for the overview.</p>
<p>Thomas showed compliance sherif, which has 233 checkpoints out of the box, but these are customisable and can be added to. It is a bigger number than the guidelines because as well as covering both WCAG 1 and 2 (and non-accessibility things), checkpoints are created for site-specific things.</p>
<p>Many of the checkpoints are based on WCAG 2 techniques. It then uses regular expression logic to spot issues in the pages.</p>
<p>The example used was to build a checkpoint to test that the search has a (visual) label.<br />
Firebug was used to find the classname of the search input. (This is where I spotted layout tables and volumous markup.)</p>
<p>A regular expression creator is used to find that item, and sets the software to search for that control and check for a 'linked element'. It looked relatively easy to use for what it's trying to do, which is quite complex.</p>
<p>It also allows you to set what would be reported, which provides a decent explanations of what it is or isn't finding. (Compared to the standard speil from many accessibility checkers.) As a broad point, I've found that any automated check across a site has to be customised for the site, or it will drown you in 'known' results time after time</p>
<p>The report shows the issues found, and apparently it is quite customisable. For me this seems to be a good approach, as you can specify which techniques are in use on the site and look for those, rather than the nebulous method of looking for generic errors. You could probably have profiles of tests as well, e.g. for HTML based standard sites.</p>
<p>Once the issue is found, the software applies a control adapter, (which takes a little while to reload//build'), then the label has been inserted. It showed a slight layout issue, but considering nothing was done to deal with the layout as part of the demo, this should be fine in practice.</p>
<p>Brian Smith asked <strong>why would you need AKS 3.0 if SP 2010 is accessible</strong> out of the box?<br />
Thomas replied that AKS 3 is aimed at SP 2007, and could perhaps be used for custom controls in 2010.</p>
<p>There was a question about authoring environment, e.g. <strong>why have font type editing</strong>:<br />
Thomas replied: That's something that MS would have to answer, but AKS for 2010 would be for things like restricting styles. We aren't at a point yet where we can assess what's needed for that yet.</p>
<p>There was a quick demo of inserting a word document. (I noted the use of Word styles such as headings).</p>
<p>There's a workflow built for this demo into SharePoint (with Compliance Sherif) that checks for things like colour contrast, alt text, and use of headings. Thomas notes that the new workflow model is very powerful. There was also an example checkpoint that highlights incorrect use of a logo in a Document.</p>
<h2>Round Table Discussion</h2>
<p>Nick Wilson (HiSoftware) hosted, with panellists: Tara (MS), Thomas (HS), Robin Christopherson (AbilityNet), Nikki Ashington (Trinity), and Peter Abrams (Journalist).</p>
<p>I have to stress that this is what I managed to get down, I've probably mis-quoted people. My comments are in [square brackets], and corrections are welcome!</p>
<dl>
<dt>Q to Thomas: Is there a plan to look into (scan) content like graphics? </dt>
<dd><cite>Thomas</cite>: We have started looking at OCR technologies for graphics processing. We don't have that now, but it's a good plan.</dd>
<dt>Q to Thomas asking if there are plans to integrate with Autonomy?</dt>
<dd><cite>Thomas</cite>: Thats why we created a web API, and were looking at partnerships with people who have different scanning engines.</dd>
<dt>Q to Nikki: Are people holding back on implementing SharePoint due to compliance issues?</dt>
<dd><cite>Nikki</cite>: It's one of the biggest requests, as we are all aware, but it isn't going to meet double-A compliance, even with the AKS (2). It will meet certain elements but not others. We usually propose to meet them as much as possible and do user testing along side. The only way we can be sure is to test with the widest range of people possible. There are parts of SharePoint we are aware are difficult to make compliant. </dd>
<dt>Robin, are many people asking about test?</dt>
<dd><cite>Robin</cite>: SharePoint is a tool, so we need to be aware that as soon as a designer touches it, it could be compromised. We (Abilitynet) aren't dogmatic about double-A, what matters is real like accessibility. If there are issues, highlight them but you have to evaluate whether they are issues for real people.For example, we've tested double-A sites with awful IA. </dd>
<dd><cite>Thomas</cite>: Something I've noticed is 3rd party controls / widgets, a lot of the vendors don't have basic accessibility knowledge, so we should be giving them feedback and making sure that isn't a problem. If they build a more accessible/successful solution, that should be more sellable.</dd>
<dt>Q to Peter: What about procurement?</dt>
<dd><cite>Peter</cite>: Anyone looking at developing new sites should include accessibility as a requirement. It's not just the public sector, the accessibility community has to explain the issues to the private sector as well. As new tools come out, like SharePoint, making it easier, this is is a good thing.Going back to the other questions, people are waiting for SP 2010 because of accessibility. Therefore it's important that people take advantage of the beta testing so we don't have to wait again! Don't wait until it's finished!</dd>
<dt>Q: Does anyone have first hand experiences in implementing SP 2007, what should we keep in mind?</dt>
<dd><cite>Nikki</cite>: There are a lot of current issues. The the reason we have this association [with Microsoft] is because I grumbled a lot about the accessibility. Obvious things include:</p>
<ul>
<li>Accessible master pages &amp; layouts are needed.</li>
<li>Resizing fonts is still difficult to achieve. But with newer browsers having zoom, do we ignore that?</li>
<li>AKS isn't a silver bullet, but it does help, Compliance Sherif is a big help with that as well.</li>
</ul>
</dd>
<dt>Q: We've gone through a lot of pain (and testing) to get where we are now. What pain would we have moving to 2010? [The migration question!]</dt>
<dd><cite>Thomas</cite>: I don't have the migration information, but I'm sure that's something that is being worked on.</dd>
<dd><cite>Tara</cite>: There are two ways:</p>
<ul>
<li>Migrate it 'intact' with the same look and feel. [I would assume that this means not benefiting from the update, in accessibility terms, at least for the front-end site.]</li>
<li>Migrate it with the 2010 look and feel. This is where most of the issues will come along.</li>
</ul>
<p>That's something our partners will be looking at.<br />
Unfortunately we can't promise perfect migration, but we do have great partners who deal with accessibility and can help.</p>
</dd>
<dt>Q: What about the Content web-adapter that we have customised? </dt>
<dd><cite>Thomas</cite>: With the RTE in 2010 being much better for AT, we're still assessing it, and that will be part of the decision process.</dd>
<dd><cite>Tara</cite>: We've had some experience with partners and people already migrating sites. We'll try and publish that feedback, what sort of issues they've had. Keep an eye on the community.</dd>
<dt>Q: There's a lot of the talk of Silverlight in Sp 2010, what's the story on that being accessible?</dt>
<dd><cite>Tara</cite>: We've really integrated Silverlight in 2010, there are some things out of the box that have been developed with WCAG 2 in mind.  In 2007 it was a bit of an afterthought, it's now much better integrated.</dd>
<dd><cite>Thomas</cite>: In terms of scanning, we can parse XAML markup, but we haven't got customers who use Silverlight yet, so it hasn't come up for us.</dd>
<dt>Q: Does it have a browser and AT baseline? </dt>
<dd><cite>Tara</cite>: I can't give you and answer on that, I'll chat with people internally and feedback via HiSoftware.</dd>
<dd><cite>Thomas</cite>: I'd just like to recommend NVDA, a free tool with the <q>most complaint experience</q> [Arrgg!]</dd>
<dd><cite>Robin</cite>: It's fantastic for testing, and in some ways it's better than JAWs for the browsing experience, definitely watch this space. However, it's not an 'enterprise' screen reader, and doesn't have good support for applications such as Excel / Powerpoint. Therefore the adoption is going to be limited on the wider scale. With Jaws, developers tend to use it in 40 minute mode for testing, so for testing NVDA is very good. As the lady pointed out though, being better than the common tool can be a problem! It's a tricky problem, I would use things like JavaScript and ARIA but not rely on them! </dd>
</dl>
<p>Ouch, Robin's last comment sort of undermines the approach the SharePoint team have taken. However, as I outlined above, I think they've done the right (and necessary) thing.</p>
<h2>Conclusions</h2>
<p>Overall, SharePoint 2010 looks fairly promising, there have been some major changes and accessibility has been a stated goal of the development. The real test will be the reports when people get their hands on the beta.</p>
<p>A frustration for me was the pervading attitude and terminology around 'compliance', not just from HiSoftware but from Microsoft people as well. Compliance shouldn't be <em>why</em> people create accessible sites and products. For example, post-content checks will become an annoyance to be bypassed for regular content authors. My company <a href="http://www.nomensa.com/">Nomensa</a> produce a Content Management System called Defacto. It's not really in the same market as SharePoint, yet, but the principles of the interface design should be similar. We concentrated on making it so that people produce accessible content, and how many post-authoring checks for accessibility or mentions of 'compliance' do you think we have? <em>Zero</em>.</p>
<p>Prevention is key, and that comes down to the authoring interface, so that's what I'll be looking for when the beta comes out.</p>
<p>Another observation is that questions on access technology baseline (from the audience) are a little misleading, the idea with WCAG 2 is to have technology baselines, which Microsoft have been very clear about.</p>
<p>A worrying trend I noticed in how people were dealing with SharePoint 2007's (lack of) accessibility was the reliance on usability testing. Don't get me wrong, usability testing is almost always a good thing to do, I come from a psychology &amp; <abbr title="Human Computer Interaction">HCI</abbr> background after all. However, the method isn't suited to saying whether something is accessible or not, unless you run <em>a lot </em>of tests. The guidelines are essentially "an expression of potential problems and solutions" (from <a href="http://www.amazon.co.uk/Universal-Design-Web-Applications-Everyone/dp/0596518730">Universal Design</a>), derived from wide-spread feedback and usability testing, and they remain the best way to evaluate whether something will be generally accessible. With that baseline, usability testing with people who have disabilities is a fantastic way to prioritise which issues are most important.</p>
<p>The most important issue that I remain unconvinced about, is the fact that accessibility in SharePoint 2010 still looks like it's extra work.<br />
The best way to make sure accessibility is incorporated is to <strong>make it the default</strong> way of developing things.</p>
]]></content:encoded>
			<wfw:commentRss>http://alastairc.ac/2009/11/sharepoint-2010-accessibility-event/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Responsibility for accessible content</title>
		<link>http://alastairc.ac/2007/07/responsibility-for-accessible-content/</link>
		<comments>http://alastairc.ac/2007/07/responsibility-for-accessible-content/#comments</comments>
		<pubDate>Sat, 21 Jul 2007 20:59:05 +0000</pubDate>
		<dc:creator>AlastairC</dc:creator>
				<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[Front-end code]]></category>
		<category><![CDATA[WYSIWYG editors]]></category>
		<category><![CDATA[content]]></category>
		<category><![CDATA[editors]]></category>
		<category><![CDATA[pdf]]></category>
		<category><![CDATA[WYSIWYG]]></category>

		<guid isPermaLink="false">http://alastairc.ac/2007/07/responsibility-for-accessible-content/</guid>
		<description><![CDATA[A simple rule for good web sites: content is golden. In an accessibility context, <em>structured</em> content is golden. It a core responsibility of the site owner to ensure this is followed (not just the developer). When you examine this issue, you can then understand why few organisations will ever produce accessible PDFs.]]></description>
			<content:encoded><![CDATA[<p>A simple rule for good web sites: content is golden. In an accessibility context, <em>structured</em> content is golden. It a core responsibility of the site owner to ensure this is followed (not just the developer). When you examine this issue, you can then understand why few organisations will ever produce accessible PDFs.</p>
<h2>Content is golden</h2>
<p>The simple principle is that you should create your content to last. </p>
<p>(X)HTML may have a limited set of elements to represent the vast array of content we want to put up, but it is important to use them, correctly. The <a href="/2006/08/why-css-is-important-for-accessibility/">separation of content and presentation underpins quite a lot of the accessibility guidelines</a>, and is what enables people using different devices to access web content in different ways. The <a href="http://wcagsamurai.org/">WCAG Samurai</a> errata makes a more general and explicit expectation that you should know HTML and use the correct structure for your content.</p>
<h3>Content, structure, presentation and behaviour</h3>
<p>And yet, you often hear developers saying that you can&#8217;t separate content and presentation, as the CSS hooks into the content. That&#8217;s not entirely true.</p>
<p>The content and presentation are separate, however both are tied to the structure. The HTML structure with it&#8217;s content becomes the foundation that you then layer on the presentation and behavior. Perhaps you might even <a href="/2007/06/cms-editable-flash/">layer on other technologies like Flash</a>.</p>
<p>Making sure that your content is well structured to start with carries a lot of other advantages:</p>
<ul>
<li>
<h4>Re-use</h4>
<p>If your basic content is well structured, clean (X)HTML, it becomes so much easier to transfer it.</p>
<p>For example, when handing over templates to a client&#8217;s development team, I generally have a set of notes that I include as one of the pages in the templates. The base contents are the same for almost every client, but they receive them in the style of their own website because the content transfers over easily.</p>
</li>
<li>
<h4>You can build functions later</h4>
<p>Well structured source material makes it easier to add functions later.</p>
<p>For example, although no one could find them without looking at the source code, I added the <code>cite</code> attribute to any <code>blockquote</code> I could, right from the start of this blog. Later, I created a little function to display the cite as a link under each quote.</p>
<p>Now any quote includes those links, even though I didn&#8217;t have the function to start with.</p>
</li>
<li>
<h4>Transformation</h4>
<p>If you are using well structured content, scripting a transformation of that content becomes much more reliable (e.g. when migrating content).</p>
</li>
</ul>
<p>I&#8217;m sure there are others as well, I may add to this list later, especially if there are some good comments.</p>
<h3>The blob in the middle</h3>
<p>In many large projects that I&#8217;ve been involved with, the content is just seen as the blob in the middle, often ignored until it&#8217;s too late.</p>
<p>Unfortunately Content Management Systems (CMSs) are like consumer electronics, you don&#8217;t know how good it is until it&#8217;s too late: after you&#8217;ve bought it. Worse still, you could have tens or hundreds of authors pumping out thousands of pages that you know are not accessible.</p>
<p>For example, if your main headings are created with:<br />
<code>&lt;span style=&quot;font-size: 18px; color: blue;&quot;&gt;&lt;/span&gt;</code></p>
<p>There are very few hooks to deal with that content later. Not only is it using inaccessible inline styling, if you want to change the formating across the site later you&#8217;ll need some awesome regular expressions and a lot of luck.</p>
<p>Ok, that&#8217;s all very CSS 101, but there are more subtle examples where you should put content above styling. For example, if the bullets on the site appear quite &#8216;crushed up together&#8217;, authors may add a line break after each bullet point. This is something again that could cause issues in content transfer later, whereas changing the styles to suit the authors wishes is better long term.</p>
<p>As well as applying alternative text to images, it is vital that all content authors know how to use the main structural items:</p>
<ul>
<li>quotes</li>
<li>tables</li>
<li>headings</li>
<li>lists</li>
</ul>
<p>And in order for authors not to try and wheedle around this, you need to make sure that the default styles look good, and as they are supposed to (often defined in an organisation&#8217;s style guide).</p>
<p>The opposite side to this it to make inappropriate structures look wrong. For example, and font element could be highlighted to the authors with: <code>font {border: 3px red dashed;}</code>. We use something similar for layout tables within the content area.</p>
<p>It should also be possible (within the editor) to apply style variations to these structural elements. In web development terms, that means the <a href="/2006/09/wysiwyg-editor-spec-css-import/#dynamic-styles">ability to apply a class to various elements</a>.</p>
<p>Thinking about it, the next frontier for WYSIWYG editors will be to allow authors to use <a href="http://microformats.org/wiki/posh">POSH</a> and apply the data for <a href="http://www.microformats.org">Microformats</a>.</p>
<h2 id="accessible-word-docs">Apply this to <em>all</em> content</h2>
<p><img src='http://alastairc.ac/wp-content/uploads/2006/07/pdf_icon.gif' alt='Portable Document Format icon.' class="alignleft" />Making good, structured, content doesn&#8217;t just apply to HMTL content. Many organisations put up a lot of PDF documents without an HTML equivalent, and therefore they want to put up accessible PDFs.</p>
<p>If you want to consistently output accessible PDFs, send all content authors on an accessible Word training course. If you just send a few central &#8216;web people&#8217; on an accessible PDF course, they will know how to create accessible PDFs, they just won&#8217;t be able to.</p>
<h3>Structured word documents</h3>
<p><img src='http://alastairc.ac/wp-content/uploads/2007/07/icon_word.gif' alt='Microsoft Word Icon.' class="alignleft" />Did you know that almost everything you can do to structure HTML content you can also <a href="http://www.webaim.org/techniques/word/">apply to Word documents</a>? (e.g. apply styles rather than inline formating). Did you also know that this is the best source material for creating an accessible PDF?</p>
<p>The reason a central team can&#8217;t usually create accessible PDFs even when they know how, is because they are either sent an unstructured PDF, or an unstructured Word document, both of which takes a lot of time to correct. The worst case scenario is being sent something that was completely image based, such as a scanned in document.</p>
<div class="captioned">
<a href='http://alastairc.ac/wp-content/uploads/2007/07/pdf_creation_times_graph.png'><img src='http://alastairc.ac/wp-content/uploads/2007/07/pdf_creation_times_graph.png' alt='Colgate style graph showing a well marked up Word document taking hardly any time, but graphical sources taking days.' class="centered" /></a></p>
<p>Creating an accessible PDF can take from a couple of minutes to several days.</p>
</div>
<p>A typical process in many organisations is:</p>
<ol id="typical-pdf-process">
<li>Person X creates a document in Word. They aren&#8217;t part of the web team, so they send it to Person Y  who is.</li>
<li>Person Y knows about accessibility, and how to create accessible PDFs. But they are busy. They look at this 20 page document which does not use Word &#8216;styles&#8217; or alternative texts, and realise that it will take over a day to sort out.</li>
<li>Person Y has other work to be doing, and doesn&#8217;t have time to correct the mistakes of Person X.</li>
<li>Another inaccessible PDF is put up on the web.</li>
</ol>
<p>The advice I give out in the policy advice section of Creating Accessible PDFs course is very rarely followed, usually because the person on the course doesn&#8217;t have the influence required:</p>
<ul id="ideal-pdf-process">
<li>Create a good Word template that includes all the styles required to follow the organisation&#8217;s style guide. Also include anything else that people regularly use as well.</li>
<li>Make this template available through the Windows domain (which most organisations seem to have).</li>
<li>Make sure everyone knows about the benefits, such as easier maintenance of the document, and automatic create of table of contents. Make training available (or required) so people know how to use Word properly.</li>
<li>Get your <del>techies</del> Windows domain expert to lock down the template, so you can <strong>only</strong> use the approved styles.</li>
<li>Start rejecting anything that doesn&#8217;t arrive using the template.</li>
</ul>
<p>Unless the central team have the power to reject content that isn&#8217;t done properly (or infinite time), the organisation won&#8217;t change, and more inaccessible content will be added to the site.</p>
<h2 id="cms-choice">CMS choice</h2>
<p>Circling back to HTML content again, the same principle applies to the editing tool used within a CMS. Authors should only be able to apply formatting using the pre-defined styles, so the the editor within a CMS should be restricted.</p>
<p>Unfortunately there <a href="/2006/08/accessible-wysiwyg-editors/">isn&#8217;t a good <acronym title="What you see is what you get">WYSIWYG</acronym> editor yet</a>. By good, I mean produces accessible content by default, supports non-technical authors in doing so, and is accessible in itself. If <a href="http://www.xstandard.com/">XStandard</a> were screen reader accessible I would use and recommend it, but I don&#8217;t think it is yet (although <a href="http://www.xstandard.com/en/documentation/xstandard-updates/2-0/">keyboard accessibility has been added recently</a>).</p>
<p>Since there isn&#8217;t a good editor (and no, text areas are not good editors), if you are implementing a CMS or transition to a new CMS, be prepared to put some time into locking down the editor.</p>
<p>Your choice of CMS should be influenced by how well it supports inputing content accessibly, and how cleanly it stores the content. For example, a CMS that uses a JavaScript editor has to do a lot of work to get around browsers bad handling of HTML (they apply inline styling by default). Although that is the approach we use currently (on <a href="http://www.defacto-cms.com">Defacto CMS</a>), the content is stored as XML without inline styling, meaning the content is clean and accessible.</p>
<p>A good sign is if the CMS allows you to export all the content in XML, as it means it can be dealt with by scripts more easily if you decide to move CMS. Don&#8217;t make the mistake of creating thousands of pages that you can only use with that CMS.</p>
<h2 id="metadata">Meta data</h2>
<p>I would be remiss not to mention metadata when talking about content. Although not my core interest, it&#8217;s another thing that is best applied by an author at the time of content creation.</p>
<p>What type of metadata you would want to use varies from project to project, and depends what you want to do with it (e.g. improve and internal search, auto-generate navigation, or enable personalisation). Ideally, you would define what metadata you want to use upfront, and customise the CMS to make that easy.</p>
<p>Some things can be automatically applied (e.g. author), but some things are best done by authors at the time of content creation. For example, applying attributes to stories from an extendable controlled vocabulary. If you are using something to analyse a page and apply metadata automatically, you&#8217;ve probably missed the point or found that it&#8217;s too late to apply it properly.</p>
<h2 id="responsibility-for-content">Responsibility for content</h2>
<p>The responsibility for content on the web site inevitably comes down to the site owner. Although this is delegated to the developers in terms of site creation and configuration, and authors when adding content, it is too easy to make a wrong decision at the beginning. For example, choosing a CMS that doesn&#8217;t support creating structured content, or not looking at the wider scope of content creation in other tools.</p>
<p>Whatever the tool, the responsibility of the site owner is to:</p>
<ul>
<li>Choose tools/products that support &amp; enforce creating accessible, structured content.</li>
<li>Choose tools/products that store the content cleanly.</li>
<li>Make sure the developers are aware of these requirements from the start.</li>
<li>Make sure authors know how and <em>why</em> they should use the structural elements properly.</li>
<li>Don&#8217;t enforce inaccessible practices (e.g. new windows for external links).</li>
<li>If you upload Word or PDF documents to the site, make sure all content authors know how to create accessible Word documents, and a central web team person knows how to create and check accessible PDFs.</li>
<li>Make sure that metadata is defined upfront, and that the interface for applying metadata makes it as easy as possible.</li>
</ul>
<p>The bottom line is that without a decent editing tool or lots of training for motivated editors, the content will be rubbish to start with.</p>
<p><strong>Technorati Tags:</strong></p>
<ul class="tags">
<li><a href="http://technorati.com/tag/editors" rel="tag">editors</a></li>
<li><a href="http://technorati.com/tag/WYSIWYG" rel="tag"><acronym title="What You See Is What You Get">WYSIWYG</acronym></a></li>
<li><a href="http://technorati.com/tag/pdf" rel="tag">pdf</a></li>
<li><a href="http://technorati.com/tag/content" rel="tag">content</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://alastairc.ac/2007/07/responsibility-for-accessible-content/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>WYSIWYG editor spec &#8211; checklist</title>
		<link>http://alastairc.ac/2007/02/wysiwyg-editor-spec-checklist/</link>
		<comments>http://alastairc.ac/2007/02/wysiwyg-editor-spec-checklist/#comments</comments>
		<pubDate>Wed, 28 Feb 2007 00:55:29 +0000</pubDate>
		<dc:creator>AlastairC</dc:creator>
				<category><![CDATA[WYSIWYG editors]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[standards]]></category>
		<category><![CDATA[WYSIWYG]]></category>

		<guid isPermaLink="false">http://alastairc.ac/2007/02/wysiwyg-editor-spec-checklist/</guid>
		<description><![CDATA[<img src="/wp-content/uploads/2006/08/wysiwyg_editor_example.thumbnail.png" class="alignleft" alt="" /> After the 10 previous posts on <acronym title="What You See Is What You Get">WYSIWYG</acronym> editors, I have compiled all the 'tips' into a checklist of things to look for in an editor. At this stage, I'd like to ask for any comments, questions or criticisms before I start applying it to editors.]]></description>
			<content:encoded><![CDATA[<p>After the 10 previous posts on <acronym title="What You See Is What You Get">WYSIWYG</acronym> editors, I have compiled all the &#8216;tips&#8217; into a checklist of things to look for in an editor. However, it&#8217;s pretty detailed! In an article, you can say &#8220;allow these useful elements, and disallow everything else&#8221;, but in a checklist, you have to be a bit more precise!</p>
<p>At this stage, I&#8217;d like to <strong>ask for any comments</strong>, questions or criticisms before I start applying it to editors.</p>
<p>You can scroll down for a link to the checklist, but I feel I have to outline the aim &#038; what it is <em>supposed</em> to do, and hopefully prevent misunderstandings.</p>
<h2 id="aim-purpose">Aim and purpose</h2>
<p>This checklist is intended to see how well a browser-based <acronym title="What You See Is What You Get">WYSIWYG</acronym> editor will perform in terms of accessibility, usability and output code quality. An intended side-effect of this is that the people creating editors also use this to improve their products. (Creating an editor is a horrifically difficult thing to do, I&#8217;d like to make improving them easier.)</p>
<p><strong>Please note:</strong> If you want general accessibility guidelines for other products that produce HTML, the best method would be to sue the <acronym title="World Wide Web Consortium">W3C</acronym>&#8216;s <a href="http://www.w3.org/TR/ATAG20/">Authoring tool guidelines</a>. Although the domain is similar, this checklist is very specific and does not have nearly as wide a scope.</p>
<p>Going through the process of scoring an editor against this checklist should indicate how easily it will allow you to set up an accessible site for editing, and help authors (the people using it) to maintain accessibility.</p>
<p>It is not intended as a pass/fail, (although a very low or negative score is not a good sign), so I&#8217;m not going to set a score that should be achieved. Although a few items are considered &#8216;core&#8217; (i.e. if these are not in place, the output is almost certain to be inaccessible), most editors should get a positive score. These things are relative, and with a few tests completed, I should be able to set up a table of results to compare editors, and allow people to make an informed choice.</p>
<h2 id="process">Process</h2>
<p>The document itself is intended to be saved off, filled in and posted, the instructions are on it. Results for the same editor between different people should be very similar, although it is likely that the largest variance will be due to how well people manage to configure the editor. (You could test the default set-up, but the scores are likely to be very poor at the moment).</p>
<p>It&#8217;s published under a creative commons license, so others are welcome to use it to publish their results if they wish to.</p>
<p>No one test of an editor should be considered final, and with comments and suggestions we can figure out how to get the best out of each editor, and hopefully feed that back into their development. </p>
<h2 id="last-call">Last call&#8230;</h2>
<p>There are a couple of to-do items left in the checklist (HTML test cases), but I&#8217;d like to ask for comments now in case I&#8217;ve missed something vital! Please feel free to leave a comment below, or email me (ac at this domain) and I will endeavor to update the checklist.</p>
<p>Without further ado, here it is: The <a href="/testing/editor_checklist/"><acronym title="What You See Is What You Get">WYSIWYG</acronym> editor checklist</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://alastairc.ac/2007/02/wysiwyg-editor-spec-checklist/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>WYSIWYG editor spec &#8211; preventing problems</title>
		<link>http://alastairc.ac/2007/02/wysiwyg-editor-spec-error-prevention/</link>
		<comments>http://alastairc.ac/2007/02/wysiwyg-editor-spec-error-prevention/#comments</comments>
		<pubDate>Sun, 11 Feb 2007 22:34:29 +0000</pubDate>
		<dc:creator>AlastairC</dc:creator>
				<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[WYSIWYG editors]]></category>

		<guid isPermaLink="false">http://alastairc.ac/2007/02/wysiwyg-editor-spec-error-prevention/</guid>
		<description><![CDATA[<img src="/wp-content/uploads/2006/08/wysiwyg_editor_example.thumbnail.png" class="alignleft" alt="" /> If the editor has followed the earlier HTML and CSS guidelines, many accessibility issues have been avoided already. This post is essentially a list of things a WYSIWYG editor could do to help authors not create accessibility barriers.]]></description>
			<content:encoded><![CDATA[<p>If the editor has followed the earlier HTML and CSS guidelines, many accessibility issues have been avoided already. This post is essentially a list of things a WYSIWYG editor could do to help authors not create accessibility barriers.</p>
<p id="methods">The methods of preventing problems tend to fall into three main types:</p>
<ol>
<li><strong>Interface:</strong> making it more difficult to create inaccessible content with the interface, either with good defaults, or things like required fields. Generally my preferred method where possible.</li>
<li><strong>Presentation</strong>: Making inaccessible content look wrong. E.g. nested <code>blockquote</code>s could have a red background.</li>
<li><strong>Enforcement</strong>: Using scripting or server side processing to highlight and enforce fixes for accessibility issues. Actually my least favourite method due to poor machine detection and potential author-frustration.</li>
</ol>
<p>The second method I&#8217;ve used for a while with developers and during <acronym title="Quality Assurance">QA</acronym>, the best article I&#8217;ve seen about it is called: <a href="http://accessites.org/site/2006/07/big-red-angry-text/"><acronym title="Big Red Angey Text">BRAT</acronym></a>, but for the most part the errors being shown there shouldn&#8217;t be possible to create with an editor anyway.</p>
<p>Going through various aspects in roughly the <a href="http://www.w3.org/TR/WCAG10/full-checklist.html"><acronym title="Web Content Accessibility Guidelines">WCAG</acronym> 1 checklist</a> order:</p>
<h2 id="suitable-alternatives">Suitable alternatives</h2>
<p>An invisible aspect for most people, alternative texts have to be enforced, but also, it isn&#8217;t that easy to know what to put. If you enforce alt text without helping with the <em>what</em>, the people using it are likely to be resentful and put in random garbage.</p>
<p>What is needed is contextual help, an aid at the time it&#8217;s needed most, when you are adding an image. Generally you&#8217;d add an image from file, and have a title and/or description field like this:</p>
<p><a href="/wp-content/uploads/2006/10/upload_image_wordpress.png"><img src="/wp-content/uploads/2006/10/upload_image_wordpress.png" id="image123" alt="Uploading image interface in WordPress." class="centered" /></a></p>
<p>To encourage better use of alternative texts you would have to tackle it in several ways, whilst ensuring you don&#8217;t make it any harder to add an image. As well as training (i.e. telling people <em>why</em> they should include text alternatives), I would provide two layers of help:</p>
<p><a href="http://alastairc.ac/wp-content/uploads/2007/02/upload_image_help.png"><img src="http://alastairc.ac/wp-content/uploads/2007/02/upload_image_help.png" alt="The browse for image dialogue with a help icon and helpful title text." class="centered" /></a></p>
<p>Renaming the label &#8220;Alternative text&#8221; actually says what it is (an alternative), without getting it confused with a title, which is often taken to mean caption. I would also added a help icon with the most basic advice in the title, and it would link to a more extensive help page.<br />
(Ironically I&#8217;ve used WordPress for years, and didn&#8217;t realise that adding a description could be used for what is effectively a <code title="Long description, a separate page with lots of room for description.">longdesc</code>.)</p>
<p>For the help page, I would create something concise from one of the better alternative text explanations (e.g. <a href="http://www.jimthatcher.com/webcourse2.htm">Jim Thatcher&#8217;s</a> or <a href="http://joeclark.org/book/sashay/serialization/Chapter06.html">Joe Clark&#8217;s</a>).</p>
<p>The alternative text field should be a required field (at a minimum). If the editor is only for the content area, I can&#8217;t think of any justification for using null alternative texts, as it is part of the content. If editor is used for more than content, using an empty alt attribute might be needed.</p>
<p>There are certain alternative texts that should be discouraged, but possible, such as file names (ending with <code>.jpg</code>, <code>.gif</code> or <code>.png</code>), texts longer than 100 characters, and perhaps non-dictionary items. It is also a good idea to include alternative texts in any <strong>spelling checks</strong> that are performed, they can quite often go unnoticed until it turns up on Google images or you check the site in an alternative device.</p>
<p>If the editor allows the additions of other non-text objects (e.g. multimedia) then alternatives should be similarly enforced.</p>
<h2 id="headings">Headings</h2>
<p>The checkpoint is to: <q cite="http://www.w3.org/TR/WCAG10/wai-pageauth.html#tech-logical-headings">Use header elements to convey document structure and use them according to specification.</q> The way that automated checkers have dealt with this has caused some strange and awkward authoring and templating practices. Basically, so long as you don&#8217;t descend more than one heading level at a time the automated checks will pass the page. On this basis, pages without headings, or with just levels 1 &#038; 2, or 5 &#038; 6 will pass, none of which are very helpful to people.</p>
<p>My criteria for this is that the main heading of the page should be an <code>h1</code>, and the other headings should mark the structure of the document in a why that helps understanding and navigation. Think of headings as creating an automatic table of contents and you shouldn&#8217;t go far wrong. Using headings &#8216;according to spec&#8217; usually aligns with an understandable structure, but shouldn&#8217;t subsume it.</p>
<p><a href='http://alastairc.ac/wp-content/uploads/2007/02/document_outline.png'><img src='http://alastairc.ac/wp-content/uploads/2007/02/document_outline.png' alt='The heading structure of a previous article shown as a heirarchical tree.' class="centered" /></a></p>
<p>Perhaps it would be possible to detect if the content is of a certain length (e.g. over 300 words) and show a post screen for the heading, such as the document outline example above.</p>
<p>For the purpose of an editor, it is common for the main heading to be defined as part of the page setup, rather than in the editor. If that is the case, the interface could be restricted to only show from <code>h2</code> onwards.</p>
<p>It is also important to make sure that authors don&#8217;t tend to use the wrong headings because of how they look. On one client site the authors preferred the look of <code>h3</code>s because they were smaller and bold, and used them rather than using any <code>h2</code>s (which were large and orange).</p>
<p>As well as making sure that using headings correctly looks right (and encouraging their use), you could add some script based checking. Perhaps something that creates an array of headings in the content area and checks for any headings that descend more than one at a time. Then add a class to erroneous headings that makes them look very wrong, e.g:</p>
<pre><code>.heading-error {
   border: 1px #f00 dashed;
}
.heading-error:after {
   content: " - inconsistent heading level.";
}</code></pre>
<p>Considering IE&#8217;s support for generated CSS content, a JavaScript equivalent is probably more effective.</p>
<p>The final check is that people aren&#8217;t creating defacto headings, e.g. a line of bold text. Again a JavaScript style check for any paragraph, div or line on it&#8217;s own that is wholly bold or strong would do the trick. </p>
<h2 id="lists-quotes">Lists and quotations</h2>
<p>There is little an editor can automatically do to detect when someone <em>should</em> be using lists or quotations but is not. Detecting several instances of dash-space on new lines might have some limited value. In a similar way you could detect paragraphs surrounded by quote marks. However, neither of these are particularly robust ways, and should not be enforced or relied on.</p>
<p>I wrote about <a href="/2006/10/wysiwyg-editor-spec-adding-structure/#blockquotes">using a &#8216;quote&#8217; button</a> rather than an indent button in a previous article, and the editor should not allow nested quotes. If for some reason it cannot enforce that, you could set the CSS to prevent people doing that:</p>
<pre><code>blockquote blockquote {
   background-color: red !important;
}</code></pre>
<h2 id="links-names">Link names</h2>
<p>Link names should be descriptive of the target, which is difficult to automatically assess, but there are a few checks that could be run either whilst editing, or an on-save check. </p>
<p>A script could check each link on the page (ideally including all links, not just those in the content area), and do the following tests:</p>
<ul>
<li>Check for common non-descriptive names, such as &#8220;more&#8221;, &#8220;read more&#8221;, &#8220;click here&#8221;, and &#8220;here&#8221;.</li>
<li>Compare the link text and URL for all <code>a</code> elements, and highlight any where:
<ul>
<li>The same URL has different link text.</li>
<li>The same link text has different URL.</li>
</ul>
</li>
</ul>
<h2 id="keywords-first">Keywords first</h2>
<p>It is helpful to put keywords first in any particular listing, whether it&#8217;s a list of links, or the headings on a page. If each link in a list of chapters starts with &#8220;Chapter&#8221;, it&#8217;s difficult to scan through visually, and even harder aurally. (Ahem, this page of <a href="/category/wysiwyg-editors/">all the WYSIWYG articles</a> is a bad example.) </p>
<p>The only check I can think of for this is to use a script to check the first few characters (e.g. 6?), and highlight this as a potential problem.</p>
<h2 id="not covered">Checks not covered</h2>
<p>Quite a few items from the accessibility checklist have not been covered here because they either don&#8217;t apply to the context of editing a page with a WYSIWYG editor, or they (should) have been prevented from becoming issues by previous posts. However, there are some that I don&#8217;t think can be automatically checked or prevented easily, if at all:</p>
<ul>
<li>Changes in language: How do you check for a section in a foreign language?</li>
<li>Use the clearest and simplest language appropriate for a site&#8217;s content: One of the most important, but most subjective issues.</li>
<li>Flickering/blinking images or objects, or those with text within the image: Anything buried in an image or object is beyond any simple check.</li>
</ul>
<h2 id="help">Help for authors</h2>
<p>Although the editing interface should be self-explanatory, &#8216;intuitive&#8217; and in general not need help, some people will need it. Help for the meaning of accessibility issues, and what they can do to fix them should be built in as a natural part of the help. Apple&#8217;s help in OSX is pretty good because the help icon is usually context-sensitive, i.e. the help page you get depends on what you were trying to do.</p>
<h2>Have I missed anything?</h2>
<p>I am only one person, if anyone else has any useful tips or ideas, please do leave a comment. There are hundreds of <acronym title="Content Management System">CMS</acronym>s, and  I&#8217;ll try in include anything extra that you come up with, assuming that it hasn&#8217;t been covered already.</p>
<p>The next step in this series to coalesce the articles into a usable checklist for evaluating the editors.</p>
<p><strong>Technorati Tags:</strong></p>
<ul class="tags">
<li><a href="http://technorati.com/tag/accessibility" rel="tag">accessibility</a></li>
<li><a href="http://technorati.com/tag/editors" rel="tag">editors</a></li>
<li><a href="http://technorati.com/tag/WYSIWYG" rel="tag"><acronym title="What You See Is What You Get">WYSIWYG</acronym></a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://alastairc.ac/2007/02/wysiwyg-editor-spec-error-prevention/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>WYSIWYG editor spec &#8211; interface accessibility</title>
		<link>http://alastairc.ac/2006/12/wysiwyg-editor-spec-interface-accessibility/</link>
		<comments>http://alastairc.ac/2006/12/wysiwyg-editor-spec-interface-accessibility/#comments</comments>
		<pubDate>Tue, 19 Dec 2006 00:56:23 +0000</pubDate>
		<dc:creator>AlastairC</dc:creator>
				<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[WYSIWYG editors]]></category>

		<guid isPermaLink="false">http://alastairc.ac/2006/12/wysiwyg-editor-spec-interface-accessibility/</guid>
		<description><![CDATA[<img src="http://alastairc.ac/wp-content/uploads/2006/08/wysiwyg_editor_example.thumbnail.png" alt="Interface example of a JavaScript based editor." class="alignleft" />The accessibility of the interface is just as important as the accessibility of the code the editor outputs. The key aspects to focus on are the 'perceptability' of controls (e.g. alt text) and ease of using a keyboard <em>only</em>.]]></description>
			<content:encoded><![CDATA[<p>The accessibility of the interface is just as important as the accessibility of the code the editor outputs. The key aspects to focus on are the &#8216;perceptability&#8217; of controls (e.g. alt text) and ease of using a keyboard <em>only</em>. Currently, I haven&#8217;t found a browser based WYSIWYG editor that is keyboard accessible out of the box [<a href="#footnote-1">1</a>], so I&#8217;ve been looking at the <a href="http://www.w3.org/TR/2006/WD-ATAG20-20061207/">Authoring Tool</a> guidelines quite a lot as they will flesh out more than I&#8217;ve had experience with. </p>
<h2 id="perceptability">Perceptability</h2>
<p>In <acronym title="World Wide Web Consortium">W3C</acronym> terms: the <q cite="http://www.w3.org/TR/2006/WD-ATAG20-20061207/#gl-tool-accessible-perceivable">Interface must be Perceivable</q>, which can be thought of separately from the interaction being possible. For example, if images are used for buttons, they need alternative text. That isn&#8217;t just for the controls (usually toolbars), but for the &#8216;what you see&#8217; content area preview, so that when you&#8217;ve added an image with alt text, you can access that as content.</p>
<p>If the interface uses pop-ups or other dialogues, these should also be accessible, so if they use HTML, the form controls and structure should comply with the content guidelines.</p>
<p>The much better known web <em>content</em> accessibility guidelines apply to this, and I don&#8217;t think it&#8217;s necessary to repeat those here.</p>
<h2 id="keyboard-accessibility">Keyboard accessibility</h2>
<p><a href="http://www.w3.org/TR/2006/WD-ATAG20-20061207/#gl-tool-accessible-operable"><acronym title="Authoring Tool Accessibility Guidelines">ATAG</acronym> 2</a> provides a good outline of what you need for keyboard accessibility, things like:</p>
<ul>
<li>You must be able to operate the editor with a keyboard only.</li>
<li>Navigating through items does not activate them.</li>
<li>You must allow navigation between controls, and around the editing interface.</li>
<li>Allow people to save settings between sessions, and preferably be able to import/export those settings.</li>
</ul>
<p>Assuming the you can navigate around the text with the keyboard, there is <strong>one primary issue</strong> that you need to get right for editing with a keyboard: Applying styles to a selection of text, and inserting items to a particular location.</p>
<p>The difficult aspect is that you generally need to be able to select a some text, and then move to the toolbar <em>without</em> affecting your current selection. There are three principle methods I can think of that might be viable within a browser based environment:</p>
<ol>
<li><strong>Keyboard short-cuts</strong>, e.g. accesskeys or binding keys to functions with JavaScript.</li>
<li>A <strong>new window</strong> for the toolbar, so you can switch from the editing window to the control window.</li>
<li>A <strong>context menu</strong>, so that you can open the possible controls without leaving the selection area.</li>
</ol>
<p>Although many screen readers allow you to separate the keyboard cursor from the location, but not everyone on a keyboard uses a screen reader, so you can&#8217;t rely on that. The mechanisms above would make using a screen reader with the editor much easier anyway.</p>
<h3 id="keyboard-shortcuts">Keyboard short-cuts</h3>
<p>This is my least preferred method due to the <a href="http://www.nomensa.com/resources/articles/accessibility-articles/access-keys.html">major limitations of accesskeys</a>, which is mainly that they tend to clash with user-agent functionality. Using JavaScript to provide the short-cuts wouldn&#8217;t be any better, and possibly more flaky with cross browser issues in assigning keys to actions. The ATAG 2 guideline says <q cite="http://www.w3.org/TR/2006/WD-ATAG20-20061207/#check-tool-conventions">observe the accessibility conventions of the platform</q>, which may not help very much at the moment, as within browsers they are not consistent yet.</p>
<p>These issues could be overcome by allowing user&#8217;s to assign keys themselves, in which case it might be a reasonable option.</p>
<h3 id="new-window">New window for controls</h3>
<p>Something of a kludge, but one method would be to pop-open a new window that contains the controls, so that you would edit in one window, and switch to the control window to add or adjust things. The advantage is that this is quite simple to do (with JavaScript) and allows an easy switching back and forth.</p>
<h3 id="context-menu">Context menu</h3>
<p>This may be the hardest method to implement accessibly, but it would also be the most usable. </p>
<p>At any point where editing, the user could call up the context menu (there is a dedicated key in Windows, you&#8217;d probably have to assign one for OSX or Linux). That menu would have the same options as the control bar/buttons, ideally it would would only show those that are relevant. For example, if there is  text selected then the inline options would be available. </p>
<p>This was covered before in a slightly different context for <a href="/2006/10/wysiwyg-editor-spec-adding-structure/#context">adding structural code</a>.  Given the number of options that might be available, it would probably have to be a cascading menu.</p>
<h2>Which option would be best?</h2>
<p>These three options are not mutually exclusive, in fact, you could happily provide all three. However, I think the context menu is the most beneficial if it can be done, as it would be useful for everyone.</p>
<p>I thought there was going to be more to write for this post, but I think the tricky bit is implementing it, not defining what it should be.</p>
<hr />
<h2 id="footnotes">Footnotes</h2>
<dl>
<dt id="footnote-1">1</dt>
<dd>At work we have hacked an open source one to make it keyboard accessible, but it wasn&#8217;t easy to do.</dd>
</dl>
<p><strong>Technorati Tags:</strong></p>
<ul class="tags">
<li><a href="http://technorati.com/tag/editors" rel="tag">editors</a></li>
<li><a href="http://technorati.com/tag/WYSIWYG" rel="tag"><acronym title="What You See Is What You Get">WYSIWYG</acronym></a></li>
<li><a href="http://technorati.com/tag/keyboard+accessibility" rel="tag">keyboard accessibility</a></li>
<li><a href="http://technorati.com/tag/ATAG" rel="tag">ATAG</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://alastairc.ac/2006/12/wysiwyg-editor-spec-interface-accessibility/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WYSIWYG editor spec &#8211; layouts</title>
		<link>http://alastairc.ac/2006/11/wysiwyg-editor-spec-layouts/</link>
		<comments>http://alastairc.ac/2006/11/wysiwyg-editor-spec-layouts/#comments</comments>
		<pubDate>Sat, 18 Nov 2006 01:15:46 +0000</pubDate>
		<dc:creator>AlastairC</dc:creator>
				<category><![CDATA[Front-end code]]></category>
		<category><![CDATA[WYSIWYG editors]]></category>

		<guid isPermaLink="false">http://alastairc.ac/2006/11/wysiwyg-editor-spec-layouts/</guid>
		<description><![CDATA[<img src="http://alastairc.ac/wp-content/uploads/2006/08/wysiwyg_editor_example.thumbnail.png" alt="Interface example of a JavaScript based editor." class="alignleft" />Having cut down what authors can use, they can just about edit regular text articles. However, I haven't met many clients who would be happy with just that! There are certain things that require the addition of code, this is how to do it.]]></description>
			<content:encoded><![CDATA[<p>Having cut down what authors can use, they can just about edit regular text articles. However, I haven&#8217;t met many clients who would be happy with just that!</p>
<p>The argument for things like the colour picker are that it allows authors freedom to create pages as they see fit. Perhaps this is true for a personal site, but in a professional organisation, a site <strong>should follow a consistent style guide</strong>. Adding designed elements should be easy, but only from a pre-defined set.</p>
<p>There are certain things that you can&#8217;t add by typing in some text and selecting a drop-down to alter the style, because certain things <strong>require the addition of code</strong>.</p>
<p>Typical examples include a box-out, quote, two columns, or even all three at once:</p>
<p><img id="image84" src="http://alastairc.ac/wp-content/uploads/2006/08/2col_quote_and_box.png" alt="Example from nomensa.com of a two column area with a quote on one side and box-out on the other." class="centered" /></p>
<p>The markup for this is fairly straightforward (slightly different from <a href="http://www.nomensa.com/client-portfolio/case-studies/barnet-council.html">the original</a>, but fine for the example):</p>
<pre>
&lt;div class=&quot;col2&quot;&gt;
 &lt;p&gt;
  &lt;img alt=&quot;logo&quot; src=&quot;logo.gif&quot;&gt;
 &lt;/p&gt;
 &lt;blockquote&gt;
  &lt;p&gt;Quote text...
  &lt;/p&gt;
 &lt;/blockquote&gt;
 &lt;p&gt;
   &lt;em&gt;- Project Manager, Some web site.&lt;/em&gt;
 &lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;col2&quot;&gt;
 &lt;div class=&quot;box&quot;&gt;
  &lt;img class=&quot;centered&quot; alt=&quot;Screenshot&quot; src=&quot;screenshot.png&quot;&gt;
  &lt;a href=&quot;#&quot;&gt;Visit the site&lt;/a&gt;
&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;&amp;nbsp;&lt;/div&gt;
</pre>
<p>Two column <code>divs</code>s, a <code>blockquote</code>, <code>p</code>aragraphs, a  <code>div</code> with a class of &#8216;box&#8217;, and a clearing <code>div</code>. But how does a WYSIWYG editor produce this kind of markup?</p>
<p>The <code>blockquote</code> is fairly easy, the user selects &#8216;blockquote&#8217; from a drop down (the one with paragraphs, headings etc) and it wraps the current paragraph in a quote (see <a href="/2006/10/wysiwyg-editor-spec-adding-structure/">structural code</a>).</p>
<p>However, some designs may need a wrapping <code>div</code> around the columns, and creating nestings would get very messy in current WYSIWYG editors, <em>especially</em> browser based ones. What is needed is a mechanism for <strong>adding pre-set bits of code</strong> that are inserted into the editor, and treated as a uneditable layout areas.</p>
<h2 id="interface">Interface to add layouts</h2>
<p>The type of interface needed to add these layout chunks is not a drop-down, as it is inserting something, not changing it. What is needed is a set of buttons, but without taking too much room in the toolbars. I would suggest using a button that when selected, creates an expandable little box of buttons to choose from:</p>
<p><img id="image150" src="http://alastairc.ac/wp-content/uploads/2006/11/layout_drawer.png" alt="Example from TinyMCE, with new layout button added, and showing an open box-out with more layout icons within it." class="centered" /></p>
<p>Excuse my poor graphics skills, but I hope you get the idea. This selection of within-page layouts adds in boxes that the editor can fill in the content for, but <strong>cannot change the layout</strong> without replacing it. (e.g. they can&#8217;t drag the sides to affect the size.) They should effectively be hard coded.</p>
<h2 id="appearance-in-editor">Appearance in the editing area</h2>
<p>These would then appear in the interface with extra borders, and some way of removing it:</p>
<p><a class="imagelink" href="http://alastairc.ac/wp-content/uploads/2006/11/layout_2col_simple.png" title="Simple example of a two column layout, dark lines indicate the layout and there is a short filler text for each column."><img id="image151" src="http://alastairc.ac/wp-content/uploads/2006/11/layout_2col_simple.png" alt="Simple example of a two column layout, dark lines indicate the layout and there is a short filler text for each column." /></a></p>
<p>The user can then edit the filler-text (&#8220;Paragraph text&#8221;) with whatever they want. In this case they could use any standard element, these are just containers.</p>
<p>A more complex version could tackle the first example I used above:</p>
<p><a class="imagelink" href="http://alastairc.ac/wp-content/uploads/2006/11/layout_2col_quote_and_box1.png" title="Example of a complex layout example, including placeholder images and quote."><img id="image152" src="http://alastairc.ac/wp-content/uploads/2006/11/layout_2col_quote_and_box1.png" alt="Example of a complex layout example, including place-holder images and quote." class="centered" /></a></p>
<p>Ideally the editor could restrict which elements were allowed in each section, but at the least the layout areas should be uneditable.</p>
<p>The type of custom features I had in mind for this type of function are within content layouts. They shouldn&#8217;t be needed for adding styles to one element (e.g. a quote), as that would be accomplished by styling that element.</p>
<h2 id="configuration">Configuration</h2>
<p>To create the complex example the site developer would need to incorporate their own template-snippets for use. Hopefully the editor would come with several pre-loaded example that the developer can use, extend, or remove.</p>
<p>How the editor does this is entirely up to it&#8217;s usual configuration, although I prefer using XML/XSL files for this purpose.</p>
<hr />
<p><strong>Technorati Tags:</strong></p>
<ul class="tags">
<li><a href="http://technorati.com/tag/editors" rel="tag">editors</a></li>
<li><a href="http://technorati.com/tag/WYSIWYG" rel="tag"><acronym title="What You See Is What You Get">WYSIWYG</acronym></a></li>
<li><a href="http://technorati.com/tag/layout" rel="tag">layout</a></li>
<li><a href="http://technorati.com/tag/css+layout" rel="tag">CSS layout</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://alastairc.ac/2006/11/wysiwyg-editor-spec-layouts/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>WYSIWYG editor spec &#8211; Tables</title>
		<link>http://alastairc.ac/2006/11/wysiwyg-editor-spec-tables/</link>
		<comments>http://alastairc.ac/2006/11/wysiwyg-editor-spec-tables/#comments</comments>
		<pubDate>Sat, 11 Nov 2006 02:14:50 +0000</pubDate>
		<dc:creator>AlastairC</dc:creator>
				<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[Front-end code]]></category>
		<category><![CDATA[WYSIWYG editors]]></category>

		<guid isPermaLink="false">http://alastairc.ac/2006/11/wysiwyg-editor-spec-tables/</guid>
		<description><![CDATA[<img src="http://alastairc.ac/wp-content/uploads/2006/08/wysiwyg_editor_example.thumbnail.png" alt="Interface example of a JavaScript based editor." class="alignleft" /> Each of the editors I've been looking at allows the addition of tables, but none of them allow the easy insertion &#038; manipulation of a data table, i.e. one with headings. I deal with data tables quite a lot for windsurfing results, and the only program I've found for decent table editing is Dreamweaver.]]></description>
			<content:encoded><![CDATA[<p><img src="http://alastairc.ac/wp-content/uploads/2006/08/wysiwyg_editor_example.thumbnail.png" alt="Interface example of a JavaScript based editor." class="alignleft" /> Each of the editors I&#8217;ve been looking at allows the addition of tables, but none of them allow the easy insertion &#038; manipulation of a data table, i.e. one with headings. I deal with data tables quite a lot for <a href="http://ukwindsurfing.com/results/2005/rankings_fw">windsurfing results</a>, and the only program I&#8217;ve found for decent table editing is Dreamweaver. (Please leave a comment if you know of something else!)</p>
<h2>Allowed &#038; required functions</h2>
<p>The first assumption is that <strong>tables are for data</strong>, not for layout, so any table added should for <a href="http://www.w3.org/TR/WAI-WEBCONTENT/#tabular-information">tabular data</a>, which by definition should have headings. Therefore the creation and editing of a table should allow manipulation of table headings. A simple data table should be the default.</p>
<p>Secondly, as a CSS friendly editor that separates content and style, there shouldn&#8217;t be any presentational attributes. Things like <code>cellpadding</code> and <code>cellspacing</code> aren&#8217;t needed any longer, unless you need an identical appearance in Mac IE and Netscape 4. So apart from standard attributes, summary is the only other attribute for the <code>table</code> element in the <a href="/2006/09/wysiwyg-editor-spec-html/">allowed HTML</a>.</p>
<h2>Styling tables</h2>
<p>In order to have minimal presentational aspects in the interface, you need some pre-set styles. There are two main aspects the user should have control over for most tables, the headings, and the general style of the table, everything else should be data.</p>
<p>The style of the table (likely to be a drop-down of options from the defined CSS files), should provide styles defined around the site&#8217;s design. These styles would affect the borders, colouring and fonts. </p>
<p>There also needs to be a mechanism to choose whether the headings go across the top, left or both. (Complex tables are covered below.)</p>
<h3 id="matching-structure-and-appearance">Getting structure and appearance to match</h3>
<p>An important aspect of getting non-technical people to use the structure properly is to ensure that how the table looks is right when the structure is right. I&#8217;ve seen people creating apparent headings with bold, rather than using headings, even when headings were available and easy to add. There are two main ways to combat this:</p>
<ol>
<li>Use a style definition such as <code>table strong {font-weight: normal;}</code>, or prevent bold/strong being applied in tables by the editor.</li>
<li>Ensuring that the styles are defined for headings as requested by the users, and/or by the style guide (if there is one).</li>
</ol>
<h2>Adding a table</h2>
<p>The usual &#8216;add a table&#8217; button gives a good indication of what code will be added, this (bad) example is from FCKeditor is typical:</p>
<p><a class="imagelink" href="http://alastairc.ac/wp-content/uploads/2006/11/tables_fckeditor.png" title="FCKeditor add table dialogue, including many sizing and presentational attributes."><img id="image137" src="http://alastairc.ac/wp-content/uploads/2006/11/tables_fckeditor.png" alt="FCKeditor add table dialogue, including many sizing and presentational attributes." class="centered" /></a></p>
<p>The default output for the table tag is:</p>
<pre><code>&lt;table width="200" cellspacing="1" cellpadding="1" border="1" align="" summary=""&gt;</code></pre>
<p>Not ideal, and missing any means of applying table headings. Dreamweaver has a different approach, and includes a method of adding structural headings:</p>
<p><a class="imagelink" href="http://alastairc.ac/wp-content/uploads/2006/11/dw_tables_add.png" title="Dreamweavers add a table dialogue."><img id="image138" src="http://alastairc.ac/wp-content/uploads/2006/11/dw_tables_add.png" alt="Dreamweavers add a table dialogue." class="centered" /></a></p>
<p>Still, there are several things here we don&#8217;t want, such as the cell attributes, and there shouldn&#8217;t be a no-heading option. With a little image-manipulation, this would be my ideal for adding a table:</p>
<p><a class="imagelink" href="http://alastairc.ac/wp-content/uploads/2006/11/table_add_ideal.png" title="A manipulated version of the Dreamweaver dialogue, reducing the options."><img id="image139" src="http://alastairc.ac/wp-content/uploads/2006/11/table_add_ideal.png" alt="A manipulated version of the Dreamweaver dialogue, reducing the options." class="centered" /></a></p>
<p>I have included <code>width</code>, but only for percentage widths. It can be useful to make a table 100% wide, or sometimes a smaller percentage of the width of the container, but working with liquid layouts and variable fonts sizes means that pixel sizing should not be available.</p>
<p>One last thing an editor could (or should?) add for simple tables would be <strong>odd-row hooks</strong> for styling. I.e. for each even row add a class: <code>&lt;tr class=&quot;even&quot;&gt;</code></p>
<p>Although you can <a href="http://domscripting.com/presentations/atmedia2006/slides/">plug this problem using JavaScript</a>, this is a small addition of HTML that provides an easy hook for CSS, and is easiest done through a programmatic mechanism such as an editor. Then applying styles to create stripped tables is easy.</p>
<h2>Editing tables</h2>
<p><a class="imagelink" href="http://alastairc.ac/wp-content/uploads/2006/11/dw_tables_initial.png" title="Initial view of a table in an editor, each column is very narrow as it's empty."><img id="image140" src="http://alastairc.ac/wp-content/uploads/2006/11/dw_tables_initial.png" alt="Initial view of a table in an editor, each column is very narrow as it's empty." class="alignleft" /></a> One of the usability issues with adding an empty table is that it appears very narrow without content, this example has a caption of &#8220;testing&#8221;. This is fiddlly, and encourages editors to drag the table or column widths, which in current editors sets the width in pixels.</p>
<p>Tables should not have draggable columns, as there is no real way of converting this to percentages. In a <a href="#complex-tables">complex table</a>, <code>col</code>s could be used to apply different widths to different columns.</p>
<p class="cl">Optionally, Dreamweaver&#8217;s &#8220;table mode&#8221; is a good way of getting around this, although it does make it appear quite different from the final version, as the warning dialogue suggests:</p>
<p><a class="imagelink" href="http://alastairc.ac/wp-content/uploads/2006/11/dw_tables_mode.png" title="The Dreamweaver warning when entering tables mode, saying that although easier, it does not display as a browser will."><img id="image141" src="http://alastairc.ac/wp-content/uploads/2006/11/dw_tables_mode.png" alt="The Dreamweaver warning when entering tables mode, saying that although easier, it does not display as a browser will." class="centered" /></a></p>
<p>Once a table is in place, there are certain functions that are best accomplished with a context menu (often a right-click). Functions like adding or removing columns or rows need a context menu because the cursor location in the table can be used to identify where the new cells should be added.</p>
<h2 id="importing-data">Importing data</h2>
<p>In practice, it is rare to be creating a table before you have the data. It isn&#8217;t easy to type into each cell, so being able to import data is vital for ease of use. However, I would consider this advanced functionality, the above would be a minimum an editor should provide. </p>
<p>There are two main plausible methods: import from a (<acronym title="comma separated values">CSV</acronym>) file, and cut &#8216;n paste.</p>
<h3 id="import-from-csv">Import from file</h3>
<p>The typical scenario would be for a user to have a spreadsheet or similar file that is the source for the table that they want to add. The steps would be:</p>
<dl>
<dt>Select &#8216;add table&#8217;</dt>
<dd>Using the usual add table button, the file aspect would be another button or tab in the table dialogue.</dd>
<dt>Select the data</dt>
<dd>The first aspect is to select the file with the data intended for the table, but there are two potential mechanisms for how much of that file to use:</p>
<ul>
<li>Inform the user that they need to save a &#8216;concise&#8217; version that removes any space above and to the left of the data.</li>
<li>Preview the data, and allow the user to select the area of the spreadsheet to use.</li>
</ul>
<p>Obviously the second method is much more difficult to implement (I&#8217;ve not seen it done), but would be very helpful.</dd>
<dt>Apply headings</dt>
<dd>Using a similar mechanism to the Dreamweaver dialogue above, the user would add the headings and style of the table, preferably with a preview.</dd>
<dt>Insert table</dt>
<dd>The table gets added to the content, and after this point is considered part of the content.</dd>
</dl>
<p>I use a macro in my <a href="http://www.jedit.org/">text editor</a> to convert from CSV to an HTML table, it is creating the interface that is the challenging aspect.</p>
<h3 id="import-from-paste">Import from cut and paste</h3>
<p>Another typical scenario would be for a user to have a source file, and want to copy part or all of it into a table. In this case the user would create a table with the usual interface, select and copy from the external file, and paste into the table. </p>
<p>The requirements for this are simply that the editor supports (kruft-free) pasting into a table, and that it matches the columns and rows or rejects the paste. It is also necessary to allow users to select multiple cells with the keyboard.</p>
<h2 id="complex-tables">Complex tables</h2>
<p>I define a complex table as any data table with more than a row or column of headings. Complex tables are a desirable but not required feature, mainly because they are hideously complex to produce properly. Not even Dreamweaver supplies a WYSIWYG editor for complex tables, and it makes no effort to produce the required attributes (at least in the MX version).</p>
<p>Although Joe Clark created <a href="http://joeclark.org/access/cinema/reviews/">a table with just about everything in it</a>, I tend to use a real life client example (and one close to a windsurfer&#8217;s heart) of <a href="http://www.broads-authority.gov.uk/boating/navigating/tide-tables.html">a tide table</a>:</p>
<p><a class="imagelink" href="http://alastairc.ac/wp-content/uploads/2006/11/complex_table.png" title="A tide table, with headings for high and low, sub headings for time and meters, and horizontal headings for months."><img id="image145" src="http://alastairc.ac/wp-content/uploads/2006/11/complex_table.png" alt="A tide table, with headings for high and low, sub headings for time and meters, and horizontal headings for months." class="centered" /></a></p>
<p>Using Gez Lemon&#8217;s excellent <a href="http://juicystudio.com/article/firefox-table-inspector.php">table inspector</a>, you can see how the headings have been applied, and I&#8217;ve also checked the readout in Jaws, which worked fine:</p>
<p><a class="imagelink" href="http://alastairc.ac/wp-content/uploads/2006/11/complex_table_reveal.png" title="The same table with the headings revealed in each cell, such as &amp;quot;November, high water, time&amp;quot;"><img id="image146" src="http://alastairc.ac/wp-content/uploads/2006/11/complex_table_reveal.png" alt="The same table with the headings revealed in each cell, such as &amp;quot;November, high water, time&amp;quot;" class="centered" /></a></p>
<p>The type of code this relies on including several elements and attributes, from <code>&lt;colgroups&gt;</code> for the upper headings, to <code>axis</code> for the horizontal headings and (most annoying to edit) the <code>headers</code> attribute on <strong>every</strong> cell. (See the <a href="http://www.webaim.org/techniques/tables/data.php">WebAim tutorial</a> for more.)</p>
<p>That example is produced from a database through an automated template, no-one would <em>want</em> to edit that by hand, so automation of some kind is vital for complex tables. But is it too complicated to do?</p>
<p>One way would be to create a new table from a pre-set selection like the main Dreamweaver interface, which would be a good start, but it could not cover the variety of different tables you might have. It also doesn&#8217;t cover the import scenario where you have data already.</p>
<p>Ideally, you would be able to either start with a new simple table, or import data as described above. Then, you would go into a &#8220;<strong>set headings mode</strong>&#8220;, and define the relationships.</p>
<h3 id="defining-table-headings">Defining headings</h3>
<p>For example, you would fill in the cells (i.e. put the text in each cell), and then bring up a context menu, set the heading or sub-heading, and select the column/row/cells that it applies to. Forgive my poor graphics skills, but this might be how you would see the tide table example when defining a heading:</p>
<p><a class="imagelink" href="http://alastairc.ac/wp-content/uploads/2006/11/complex_table_editing2.png" title="Complex table with a heading outlined in red, and the column underneath outlined in a dashed border."><img id="image147" src="http://alastairc.ac/wp-content/uploads/2006/11/complex_table_editing2.png" alt="Complex table with a heading outlined in red, and the column underneath outlined in a dashed border." class="centered" /></a></p>
<p>I would suggest this is a distinct mode, as it is a phase (or even wizard) that you go through to start with, and probably don&#8217;t touch again. There are other functions that would be part of the normal context menu for tables (add/remove columns for example), so one of those options would be &#8220;adjust headings&#8221;. </p>
<p>This WYSIWYG editing would automatically add IDs for each heading, and defined options of which cells they can apply to. I&#8217;m not entirely certain if you could automatically add <code>&lt;col&gt;</code>s and <code>&lt;colgroups&gt;</code>, but it would be worth trying.</p>
<p>Some of these interface methods are new to this domain, are there better ways to deal with complex tables in editors?</p>
<hr/>
<p><strong>Technorati Tags:</strong></p>
<ul class="tags">
<li><a href="http://technorati.com/tag/accessibility" rel="tag">accessibility</a></li>
<li><a href="http://technorati.com/tag/editors" rel="tag">editors</a></li>
<li><a href="http://technorati.com/tag/WYSIWYG" rel="tag"><acronym title="What You See Is What You Get">WYSIWYG</acronym></a></li>
<li><a href="http://technorati.com/tag/tables" rel="tag">tables</a></li>
<li><a href="http://technorati.com/tag/html+tables" rel="tag">HTML tables</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://alastairc.ac/2006/11/wysiwyg-editor-spec-tables/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WYSIWYG editor spec &#8211; images</title>
		<link>http://alastairc.ac/2006/10/wysiwyg-editor-spec-images/</link>
		<comments>http://alastairc.ac/2006/10/wysiwyg-editor-spec-images/#comments</comments>
		<pubDate>Thu, 19 Oct 2006 23:20:23 +0000</pubDate>
		<dc:creator>AlastairC</dc:creator>
				<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[Front-end code]]></category>
		<category><![CDATA[WYSIWYG editors]]></category>

		<guid isPermaLink="false">http://alastairc.ac/2006/10/wysiwyg-editor-spec-images/</guid>
		<description><![CDATA[<img id="image83" src="http://alastairc.ac/wp-content/uploads/2006/08/wysiwyg_editor_example.thumbnail.png" alt="Interface example of a JavaScript based editor." class="alignleft" />Adding images in an easy and accessible way is a vital part of a modern WYSIWYG editor, and one of the things the almost all of the implementations I've come across get wrong. There are several levels of implementation, from adding images from other locations, to creating and choosing from a library of images and other assets. ]]></description>
			<content:encoded><![CDATA[<p>Adding images in an easy and accessible way is a vital part of a modern WYSIWYG editor, and one of the things the almost all of the implementations I&#8217;ve come across get wrong. There are several levels of implementation, from adding images using a URL, to creating and choosing from a library. </p>
<h2>The simple interface</h2>
<p>It might be considered beyond the scope of an editor to cover image libraries, if so, the simple case should be just that: simple.</p>
<p>From the <a href="/2006/09/wysiwyg-editor-spec-html/">allowed HTML</a>, we know that most of these fields should <strong>not</strong> be there:</p>
<p><a href="http://alastairc.ac/wp-content/uploads/2006/10/add_image_tinymce.png"><img id="image120" src="http://alastairc.ac/wp-content/uploads/2006/10/add_image_tinymce.png" alt="Add image example from TinyMCE showing many fields such as border and align." class="centered" /></a></p>
<p>The three things required at a minimum are:</p>
<ul>
<li>Location (i.e. URL)</li>
<li>Text alternative</li>
<li>Style</li>
</ul>
<p>The interface for adding an image should not include depricated attributes such as border, hspace and align. Other attributes that might be allowed, but probably behind another tab are in the <a href="/2006/09/wysiwyg-editor-spec-html/#custom-attributes-list">custom attributes list</a> (<code>id</code> and <code>longdesc</code> come to mind).</p>
<p>As we saw from <a href="/2006/09/wysiwyg-editor-spec-css-import/#dynamic-styles">dynamic styles</a>, it is best to only show what is relevant in style selections. The editor could either detect styles such as <code>img.alignleft</code>, or allow the developer to configure the styles available. This style would be applied as a class to the image.</p>
<p>When the user has to type or paste in a URL, it would be best to show a preview of the image, or at least some indication that the image is valid.</p>
<p>I am inclined to recommend that editors do not allow authors to re-size images. Using the mouse to grab a corner and re-size makes many people think that the image is being shunk, when it just <em>appears</em> to be have been shrunk. Also, browser do not render re-sized images well.</p>
<h2 id="image-libraries">Image Libraries</h2>
<p>Having to cut and paste in a URL to add an image is a pain, and is not nearly as usable as choosing one.</p>
<p>Having a choice of images requires more integration than just slapping in an editor, it requires reading from and writing to the file system of the server. It is also this that is the worst aspect of many editors, either because it adds such a complicated interface, or because it is not flexible in how it integrates with the server.</p>
<h3 id="browsing-library">Browsing an image library</h3>
<p>There is one exception I have come across that is (relatively) simple to set up, has a simple interface, and is fairly flexible in where it can browse. This exception is a (now defunct) WordPress pluggin called <a href="http://www.bistr-o-mathik.org/code/wordpress-plugins/">Iimage browser</a>. Unfortunately it doesn&#8217;t work with the WYSIWYG editor, just the code view.</p>
<p>The <a href="http://ukwindsurfing.com/">UK Windsurfing Association</a> site has thousands of pictures which are of several types. It has &#8216;graphics&#8217; that include logos (100s), event maps (10s), flags (10s), and sailor profile pictures (100s). It also has several years worth of &#8216;galleries&#8217;, consisting of an average of 30 pictures per event, with 10-20 events per year. That&#8217;s a lot of pictures, and they need <strong>categorising</strong>:</p>
<p><a href="http://alastairc.ac/wp-content/uploads/2006/10/add_image_iimage.png"><img id="image121" src="http://alastairc.ac/wp-content/uploads/2006/10/add_image_iimage.png" alt="The top screen of iimage, which shows the top level categories of pictures." class="centered" /></a></p>
<p>This pluggin shows the images from the file system within a reasonably standard web page (requiring JavaScript, but hey, you need JavaScript to have gotten here). The links at the top are your navigation through the folders. It even understands thumbnails, and any image with a matching version preceded by <code>_thb_</code> is treated as having a thumbnail.</p>
<p>Although the galleries images are held quite separately, I created a symbolic link (like a short-cut) in the file system so that it could read the images, and adjusted the script to use the real location of the gallery images when chosen.</p>
<p>The interface to add an image revolves around adding the code, but is still a good example of what should be there:</p>
<p><a href="http://alastairc.ac/wp-content/uploads/2006/10/add_image_iimage2.png"><img id="image122" src="http://alastairc.ac/wp-content/uploads/2006/10/add_image_iimage2.png" alt="Iimage interface, adding a image with the options for how it should be inserted." class="centered" /></a></p>
<p>If you removed the code panel (as we are aiming at WYSIWYG editors), and added a style drop-down this would be ideal. I haven&#8217;t found anything that allows you to add thumbnails with links to the large image as easily.</p>
<h3>Uploading to an image library</h3>
<p>The ability to add images is a strong requirement as well, as asking non-technical people to use FTP is something of a non-starter, I have tried repeatedly!</p>
<p>The current WordPress functionality works well, you don&#8217;t have to leave the editing interface to upload a picture:</p>
<p><a href="http://alastairc.ac/wp-content/uploads/2006/10/upload_image_wordpress.png"><img id="image123" src="http://alastairc.ac/wp-content/uploads/2006/10/upload_image_wordpress.png" alt="Uploading image interface in WordPress." class="centered" /></a></p>
<p>The upload interface includes a field for &#8216;title&#8217;, which becomes the default alternative text. I&#8217;ve tried to think of a reason why people would apply different alternative text in different situations, but it seems unlikely and I don&#8217;t see a problem with <strong>centralised alternative text</strong> (assuming that you can edit the alternative text after upload).</p>
<p>There should be some <strong>guidance on what makes good alternative text</strong>, preferably in context, when the user is uploading the picture. A help symbol next to &#8216;title&#8217;, which expands to show concise guidance, such as &#8220;imagine you were describing the picture to someone over the phone&#8221;. Since editors in this context are only adding images to the content, it is unlikely that a null alt would be suitable, so file names and null alts should result in a warning.</p>
<p>The uploading process should <strong>process the image</strong>. How many times have you come across non-technical authors uploading a 3MB, 99% quality picture straight from a camera? The picture should be reduced to a size configured by the developer, for example, constrained to 550px square at 75% quality. It would also be useful to automatically create a thumbnail as well.</p>
<p>Another useful feature would be the ability to <strong>upload a folder</strong>, or set, of images all at once. You&#8217;d have to set it off and leave it, but it would be invaluable for galleries. Another option would be to integrate with a popular gallery, making sure that you have access to those pictures as well as the option to upload your own.</p>
<h2>Conclusions</h2>
<p>Although I am now leaving the analysis of the editors to the end of this series, I know from experience that this is one of the most frustration aspects of trying to integrate a WYSIWYG editor with a real web site (as opposed to just testing).</p>
<p>I will have to scour the internet for plugins for each of the editors to test this fully.</p>
<hr />
<p><strong>Technorati Tags:</strong></p>
<ul class="tags">
<li><a href="http://technorati.com/tag/accessibility" rel="tag">accessibility</a></li>
<li><a href="http://technorati.com/tag/editors" rel="tag">editors</a></li>
<li><a href="http://technorati.com/tag/WYSIWYG" rel="tag"><acronym title="What You See Is What You Get">WYSIWYG</acronym></a></li>
<li><a href="http://technorati.com/tag/usability" rel="tag">usability</a></li>
<li><a href="http://technorati.com/tag/images" rel="tag">images</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://alastairc.ac/2006/10/wysiwyg-editor-spec-images/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WYSIWYG editors spec &#8211; adding structural code</title>
		<link>http://alastairc.ac/2006/10/wysiwyg-editor-spec-adding-structure/</link>
		<comments>http://alastairc.ac/2006/10/wysiwyg-editor-spec-adding-structure/#comments</comments>
		<pubDate>Wed, 11 Oct 2006 22:49:05 +0000</pubDate>
		<dc:creator>AlastairC</dc:creator>
				<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[Front-end code]]></category>
		<category><![CDATA[WYSIWYG editors]]></category>

		<guid isPermaLink="false">http://alastairc.ac/2006/10/wysiwyg-editor-spec-adding-structure/</guid>
		<description><![CDATA[<img src="http://alastairc.ac/wp-content/uploads/2006/08/wysiwyg_editor_example.png" alt="Interface example of a WYSIWYG editor." class="alignleft" /> With a WYSIWYG interface, there has to be an area that appears as it will when published, which means to change bits within it, you need one or more toolbars. This is an exploration of what those toolbars should do.]]></description>
			<content:encoded><![CDATA[<p>When an author changes the appearance of a page, those changes should be represented in the underlying structure of the page. This post looks at what the interface should be.</p>
<p>With a WYSIWYG interface, there has to be an area that appears as it will when published, which means to change bits within it, you need one or more toolbars. This is an exploration of what those toolbars should do.</p>
<h2 id="block-elements">Block elements</h2>
<p>You could argue that the author doesn&#8217;t need to know anything about block or inline elements, they should simply apply a heading (block) or bold (inline). I would agree, but these elements behave quite differently when published, so on balance, I would rather make that explicit in the interface, and mark the behaviour as different.</p>
<p>The default installations of the editors don&#8217;t tend to separate block and inline elements, this is a screen shot from X-Standard lite:</p>
<p><img id="image107" src="http://alastairc.ac/wp-content/uploads/2006/10/xstandard_styles.png" alt="X-Standard interface with the styles drop-down showing all available styles." class="centered"/></p>
<p>The issues I&#8217;ve seen with this are that there is a gap between what the user thinks will happen, and what does. I&#8217;d like separate mechanisms for applying block and inline elements, and buttons for elements that require a more wizard like approach (e.g. tables and images).</p>
<p>Essentially, when applying a block element (heading, paragraph etc.) it shouldn&#8217;t matter whether some text is selected or not, the change would apply to the block element around the cursor.</p>
<p>There are quite a few block elements (headings etc.), so a drop-down widget seems like a good choice:</p>
<p><img id="image108" src="http://alastairc.ac/wp-content/uploads/2006/10/tiny_mce_styles.png" alt="TinyMCE editor with styles open." class="centered" /></p>
<p>That drop-down would default to paragraph, and include:</p>
<dl id="default-block-elements">
<dt>Paragraph</dt>
<dd><code>&lt;p&gt;</code></dd>
<dt>Main heading</dt>
<dd><code>&lt;h1&gt;</code></dd>
<dt>Heading</dt>
<dd><code>&lt;h2&gt;</code></dd>
<dt>Sub-heading</dt>
<dd><code>&lt;h3&gt;</code></dd>
<dt>Quote (block)</dt>
<dd><code>&lt;blockquote&gt; &lt;p&gt;</code></dd>
</dl>
<p>There are several other block elements that are not in that list because people are either used to them being separate (lists, horizontal rule) or because they require more information (tables). These need their own buttons:</p>
<dl id="buttons-block-elements">
<dt>Bulleted list</dt>
<dd><code>&lt;ul&gt;&lt;li&gt;</code></dd>
<dt>Numbered list</dt>
<dd><code>&lt;ol&gt;&lt;li&gt;</code></dd>
<dt>Definition list</dt>
<dd><code>&lt;dl&gt;&lt;dt&gt;&lt;dd&gt;</code></dd>
<dt>Horizontal Rule</dt>
<dd><code>&lt;hr&gt;</code></dd>
<dt>Table</dt>
<dd><code>&lt;table&gt;</code> (would require a wizard approach).</dd>
</dl>
<h2 id="inline-elements">Inline elements</h2>
<p>Applying inline elements generally requires the user to select a certain amount of text and then select a button which then wraps the text in the appropriate tag (see below). Some editors allow the user to switch-on bold (for example), write, and then switch it off, and carry on writing. &#8216;m in two minds about that, it means that buttons to not act consistently, but it is a learned behaviour from other editors. So long as it replicates other editors and doesn&#8217;t disrupt the markup, it should be ok.</p>
<dl id="default-inline-elements">
<dt>link</dt>
<dd><code>&lt;a&gt;</code></dd>
<dt>image</dt>
<dd><code>&lt;img&gt;</code></dd>
<dt>bold</dt>
<dd><code>&lt;strong&gt;</code></dd>
<dt>italics</dt>
<dd><code>&lt;em&gt;</code></dd>
<dt>strikethrough</dt>
<dd><code>&lt;del&gt;</code></dd>
<dt>code</dt>
<dd><code>&lt;code&gt;</code></dd>
<dt>quote</dt>
<dd><code>&lt;q&gt;</code></dd>
<dt>subscript</dt>
<dd><code>&lt;sub&gt;</code></dd>
<dt>superscript</dt>
<dd><code>&lt;sup&gt;</code></dd>
<dt>acronym</dt>
<dd><code>&lt;acronym&gt;</code></dd>
</dl>
<p>There are a few others that you could include: <code>cite</code>, <code>dfn</code>, <code>ins</code>, or others from the <a href="/2006/09/wysiwyg-editor-spec-html/">allowed HTML</a> list, but these are the ones I&#8217;ve found are most commonly used.</p>
<p>The exceptions are images, links and acronyms; which require more information, however they are still inline items, and follow the same type of rules.</p>
<p>That leaves a useful set of elements to work with, and a means of applying style variations:</p>
<p><img id="image109" src="http://alastairc.ac/wp-content/uploads/2006/10/tinymce_toolbar.png" alt="The TinyMCE toolbar with the elements outlined." class="centered" /></p>
<p>(NB: This example was created with TinyMCE, which is missing <code>acronym</code> and doesn&#8217;t necessarily produce the correct markup for each item.)</p>
<h2 id="interface-variations">Interface variations for elements</h2>
<p>There are certain behaviours that you would want an editor to show that vary by the element being used.</p>
<h3 id="paragraphs">Paragraphs, line breaks and spaces</h3>
<p>By default, an editor should make a new paragraph when the user presses <kbd>return</kbd>. A line break can be added with <kbd>shift-return</kbd>. This applies to headings as well, so that upon <kbd>return</kbd> a new paragraph is added below with focus. If the cursor is not at the end of the element, it would split the current element into two.</p>
<p>An editor should not insert non-breaking spaces (<code>&amp;nbsp;</code>) if the user presses <kbd>space</kbd> more than once, it should ignore the attempt.</p>
<h3 id="blockquotes">Blockquote &amp; Quote</h3>
<p>One of the primary interface problems with blockquotes is that they are often referred to as indentation &#8211; a very clear problem when trying to get non-technical people to use them correctly! Blockquotes are also tricky because it allows other block elements within it, usually paragraphs. I would suggest that:</p>
<ul>
<li>Blockquote <strong>must</strong> be referred to as &#8220;quote&#8221;, &#8220;block quote&#8221; or similar, not indent.</li>
<li>When a paragraph is made into a blockquote, there is automatically a paragraph inside and below the blockquote, with the focus remaining in the blockquote. This would enable the user to add paragraphs or other elements within the quote and press <kbd>down</kbd> to leave the quote.</li>
<li>There must be a mechanism to add the <code>cite</code> attribute (a URL). This could be:
<ul>
<li>a &#8216;properties&#8217; command (button or context menu).</li>
<li>A wizard approach where a box pops-up with URL and text fields.</li>
<li>Something is added to the interface that the user can select, for example:<br />
   <img id="image110" src="http://alastairc.ac/wp-content/uploads/2006/10/quote_url_box.png" alt="A sample quote with a 'URL' button added to the interface next to the quote." /></li>
</ul>
</li>
</ul>
<p>The quote (<code>q</code>) element is an inline version, so cannot contain block elements but should allow the addition of the cite URL.</p>
<h3 id="lists">Lists</h3>
<p>There are two primary behaviours needed for lists:</p>
<ul>
<li>Pressing tab within a list creates a correctly nested list.</li>
<li>When the cursor is within the last item and it is blank, pressing <kbd>return</kbd> will remove the item and start a paragraph below the list.</li>
</ul>
<p>Very few editors do nested lists properly, to many times they will <strong>incorrectly</strong> do this:</p>
<pre>&lt;ul&gt;
 &lt;li&gt;Item one&lt;/li&gt;
 &lt;ul&gt;
  &lt;li&gt;sub-item one&lt;/li&gt;
 &lt;/ul&gt;
&lt;/ul&gt;</pre>
<p>However, a nested list should be <strong>within</strong> a list item.</p>
<h3 id="links-acronyms-images">Links, acronyms &amp; images</h3>
<p>Images will be covered in greater detail later, but all these elements require more information than simply applying a style. An image requires an image location and alternative text, links require a URL, an acronym should have a title. Selecting the button should open up a dialogue to take the appropriate information.</p>
<h2 id="context">Context menu</h2>
<p>A context menu (often right-click in windows, or control-click in OSX) can be a very useful short-cut to changing the selected item. These menus should be dynamic (i.e. change depending on the context), and given browser controls I am surprised that editors don&#8217;t usually provide a button for this type of function, as right-clicking can be over-ridden by the browser.</p>
<p>In the same way that the <a href="/2006/09/wysiwyg-editor-spec-css-import/#dynamic-styles">style drop-downs should be dynamic</a>, the context menu would provide access to the additional attributes of the element in question, but only those defined in the <a href="/2006/09/wysiwyg-editor-spec-html/">allowed HTML</a>. </p>
<p>The JavaScript based editors do not produce a context menu for me (they may on Internet Explorer for Windows), surprisingly neither does Xstandard, although that could be because it&#8217;s the beta version for OSX.</p>
<p>A context menu would be a useful addition that allows quick access to attributes of each element, as well as the usual cut and paste.</p>
<h2 id="editor-examples">How the editors do</h2>
<p>Previously I have been through each editor at this stage, however, it&#8217;s a slow process trying the different configurations for each. Instead, I&#8217;m going to leave that to the end, and instead build up a check list of all the points covered in each of these WYSIWYG posts. Then I can test each editor from start to finish, not only establishing the best and worst points of each, but finding the best configurations for each.</p>
<p><strong>Coming soon</strong>, how editors should let you add alternative text to images and manage images.</p>
<hr />
<p><strong>Technorati Tags:</strong></p>
<ul class="tags">
<li><a href="http://technorati.com/tag/accessibility" rel="tag">accessibility</a></li>
<li><a href="http://technorati.com/tag/editors" rel="tag">editors</a></li>
<li><a href="http://technorati.com/tag/WYSIWYG" rel="tag"><acronym title="What You See Is What You Get">WYSIWYG</acronym></a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://alastairc.ac/2006/10/wysiwyg-editor-spec-adding-structure/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
	</channel>
</rss>
