update site

master
Tait Hoyem 2 years ago
parent 178b20f414
commit 2aa2a139a3

@ -0,0 +1,268 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>From Software Deveoper To Accessible Technology Master | tait.tech</title>
<link rel="stylesheet" href="/assets/css/style.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="Tait Hoyem">
<meta name="keywords" content="">
<meta name="description" content="">
</head>
<body>
<div id="wrapper">
<header>
<h1>tait.tech</h1>
<nav>
<a href="/" class="nav-link" >Home</a>
<a href="/blog/" class="nav-link" >Blog</a>
<a href="/ideas/" class="nav-link" >Ideas</a>
<a href="/links/" class="nav-link" >Links</a>
<a href="https://github.com/TTWNO/" class="nav-link" target="_blank" rel="noopener noreferrer" >Github</a>
</nav>
</header>
<main>
<article>
<header>
<h1 class="post-title">From Software Deveoper To Accessible Technology Master</h1>
<time datetime="21-12-11" class="post-date">Saturday, December 11 2021</time>
</header>
<hr>
<p>Here are some interesting problems I have faced when working with DBus, AT-SPI (Accessible TechnologySerial Protocol Interface) and the Rust programming language.
I realize these are fairly unique constraints, and this information is likely only relevant for a select few, but I thought the experience might be worthwhile to write down:
for my own sanity when I inevitably experience these same issues later and for others who may want to contribute to our new screen reader project <a href="https://yggdrasil-sr.github.io">Odilia</a>.</p>
<h2 id="dbus">DBus</h2>
<p><a href="???">DBus</a> is a cool API!
Well its not an API, but rather a mechanism to share messages across processes in Linux;
this is generally called IPC or Inter-Process Communication.
DBus can be used to <a href="???">send and receive desktop notifications</a>,
<a href="???">shutdown your computer</a>
and, for my purposes <a href="???">get accessibility events</a>.</p>
<h3 id="inner-workings">Inner Workings</h3>
<p>DBus is an object-oriented approach to IPC.
It is split up into 3 main components that work together:</p>
<ol>
<li>Objects</li>
<li>Interfaces</li>
<li>Methods</li>
</ol>
<h4 id="objects">Objects</h4>
<p>Objects are just like objects you learned in your CS classes;
it is a structure which contains attributes, and methods which can be called on the object.
DBus objects are very similar, except that attributes are called properties.</p>
<p>Most DBus libraries provide a way for you to use “native objects” (i.e., a Python object, a C++ object, a Rust structure + implementation, etc.); this allows access to DBus methods using the language features available to you.
So for example, in Python you might write:</p>
<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">obj</span> <span class="o">=</span> <span class="n">some_function</span><span class="p">()</span>
<span class="k">print</span><span class="p">(</span><span class="n">obj</span><span class="p">.</span><span class="n">get_text</span><span class="p">())</span> <span class="c1"># using a method
</span><span class="k">print</span><span class="p">(</span><span class="n">obj</span><span class="p">.</span><span class="n">locale</span><span class="p">)</span> <span class="c1"># using a property
</span></code></pre></div></div>
<p>This would print out whatever may be returned from the objects GetText method.
Notice that DBus methods are always camel case (i.e., capitalized at each starting letter of a word).
// TODO might not be camel</p>
<h4 id="interfaces">Interfaces</h4>
<p>A DBus interface (not to be confused with a Java interface, or a Rust trait) is a collection of methods.</p>
<h3 id="accessibility-events--information">Accessibility Events &amp; Information</h3>
<p>What kind of events are “accessibility events”?
Lets assume for a moment that you cannot see anything. You are blind.
If you try to read an article you obviously cannot see what is on your screen, so you need something to read it to you.
This technology that reads your screen to you is, uncreativly (TODO) called a screenreader, sometimes abbreviated “SR”.
Well how does a screen reader know what is on the screen? How does it know what a button is? And a link?
How does it know if content has changed or if an alert has been sent?
The former describes accessibility information (i.e., this button contains a certain string of text);
the latter describes an accessibility event (an <code class="language-plaintext highlighter-rouge">aria-live</code> region has been updated, or an alert box has been displayed).</p>
<p>DBus, Linuxs IPC mechanism, can send these events and information to you, if you ask for it.
This is what I want if Im to create anything like a screenreader.
I will show a minimal example of how to do this in Rust.</p>
<div class="language-rust highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="cs"># register with registry</span>
<span class="cs"># get a match rule on org.a11y.Bus</span>
<span class="cs"># receive ObjectChanged events</span>
</code></pre></div></div>
<p>(EXPLAIN)</p>
<p>…The specification that is used to send this information to our DBus connection is called AT-SPI: Accessible TechnologySerial Protocol Interface.</p>
<h2 id="at-spi">AT-SPI</h2>
<p>AT-SPI are a set of XML files that specify <em>how</em> to send data across DBus.
Im going to be honest: at first this system <em>seems</em> very convoluted and unnecessarily complex.
Over time though, this system has grown on me as I start to see its “complexities” as a sort of after-affect of the core principle of <em>simplicity</em> used within DBus and the specifications which use it.</p>
<p>Ive already explained (TODO) that DBus has a system of narrowing things down in the order: 1) bus, 2) path, 3) interface and 4) method.
???</p>
<p>So lets say we want to implement the most basic thing a screenreader can do: read text.
Lets suppose we already have an item we want to get the text of.
Now to get the text of it, we call a method on the interface and pass the path.
This is abstracted away for us, generally speaking, when using any kind of language-specific DBus binding, but its better to be explicit in this case.</p>
<p>No problem! We call <code class="language-plaintext highlighter-rouge">item.get_text()</code> and thats it, right?
No.
This is where, again, this “complexity” comes in.
Again, it starts out this way, but it will grow on anyone who enjoys the idea of the UNIX principles with time and understanding.</p>
<p>So what happens if we do <code class="language-plaintext highlighter-rouge">obj.get_text()</code>?
Lets try it on the first list item on my websites <a href="/">homepage</a>:</p>
<p>Here is the excerpt as it is currently written:</p>
<blockquote>
<p>I have three goals in my software development career:</p>
<ol>
<li>Strong adherence to the <a href="https://?">UNIX principles</a> of software design.</li>
<li>Security, privacy and anonymity of the internet.</li>
<li>Accessibility of technology to the visually impaired.</li>
</ol>
</blockquote>
<p>What would you expect to receive if you ran <code class="language-plaintext highlighter-rouge">get_text()</code> on the first list item there?
If you, like me, were a little brainlette, you probably guessed “1. Strong adherence to the UNIX Principles of software design.”
Lets find out how well that works…</p>
<div class="language-rust highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">let</span> <span class="n">text</span> <span class="o">=</span> <span class="n">acc</span><span class="nf">.get_text</span><span class="p">();</span>
<span class="nd">println!</span><span class="p">(</span><span class="s">"TEXT: </span><span class="se">\"</span><span class="s">{}</span><span class="se">\"</span><span class="s">"</span><span class="p">,</span> <span class="n">text</span><span class="p">);</span>
<span class="err">$</span> <span class="n">cargo</span> <span class="n">run</span>
<span class="n">TEXT</span><span class="p">:</span> <span class="s">"1. Strong aherance to the of software design."</span>
</code></pre></div></div>
<p>If you read that carefully, youll see there are what look like three speces where the UNIX principles link should go.
This is <em>extremely</em> deceptive for two reasons:</p>
<ol>
<li>One of those is <em>NOT</em> a space. Its an <a href="https;//???">Object Replacement Character</a> aka Unicode Point U+FFFC.</li>
<li>It looks like it has just dropped a piece of text without telling us! And without a way to get it back! <em>Gasp!</em> Oh the horror!</li>
</ol>
<p>This is what I thought too.
But let me defend this for a minute.</p>
<p>What if you had something complex like a table, a block quote, an image or even something like a <a href="example">MathML</a> equation inside the block of text (in our case, inside a list item, but this applies to any piece of text inside another)?
If you had a table, would you want to read it out?
MathML, you might want to say everything upfront, but MathML would need some amount of processing before it be readable as text.
And even with a link, there is a reason for this.</p>
<p>If you can see perfectly find and browse the web like anyone else, with your eyes, you can see what is a visited and unvisited link based on the color of the link. A darker color generally indicated a visited link,
whereas a lighted color generally indicates an unvisited link.
When a screenreader gets info about a piece of text, it would need to include that information to its user like “UNIX princples…link” or “UNIX principles…visited link”.
So if I get the text of some item which contains another, should it include all sub items? What about just links? Should it tell you if the link is visited or not?</p>
<p>It gets fairly complicated really quickly, and this has given me pause in my youthful “the system is broken” angst that generally plagues my thinking;
instead I see this is a very sober-minded and UNIX-y design principle that I think makes much more sense than the alternative.
Here are some major advantages of this method:</p>
<ol>
<li>It allows <em>optional</em> processing of sub-elements; maybe you dont care what is underneath the element: this saves processing power and complexity.</li>
<li>It allows <em>custom</em> processing of sub-elements; you do not have to rely on AT-SPI to tell you what information you want. Perhaps you only need the role of the sub element, not the entire text of it: again, this saves CPU cycles and code complexity.</li>
<li>Allows arbitrary data to be inside any other structural element. This is optimal for HTML, which is built to be entirely arbitrary when it comes to how much data is encoded into one tag. (TODO write it better).</li>
</ol>
<p>This is actually genius design!
My next question was: “If it uses the object replacement cahracter so it can replace the children, then what happens if the object replacement character is actually in the text?”
Well, with some processing you can actually find out where each child goes, or if the object replacement character is actually written in the text itself.
How so?</p>
<p>First off, lets get a list of children.
We can do this with <code class="language-plaintext highlighter-rouge">acc.get_children()</code>.</p>
<div class="language-rust highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nd">println!</span><span class="p">(</span><span class="s">"CHILDREN: {:?}"</span><span class="p">,</span> <span class="n">acc</span><span class="nf">.get_children</span><span class="p">()</span><span class="k">.await</span><span class="nf">.unwrap</span><span class="p">());</span>
<span class="err">$</span> <span class="n">cargo</span> <span class="n">run</span>
<span class="n">CHILDREN</span><span class="p">:</span> <span class="p">[(</span><span class="s">":1.7"</span><span class="p">,</span> <span class="nf">Path</span><span class="p">(</span><span class="s">"/org/a11y/atspi/accessible/193</span><span class="err">\</span><span class="s">u{0}"</span><span class="p">)),</span> <span class="p">(</span><span class="s">":1.7"</span><span class="p">,</span> <span class="nf">Path</span><span class="p">(</span><span class="s">"/org/a11y/atspi/accessible/194</span><span class="err">\</span><span class="s">u{0}"</span><span class="p">))]</span>
</code></pre></div></div>
<p>Youll notice that the children are merely a list of tuples;
each tuples only contains, at its core, two strings:</p>
<ul>
<li>Sender: A string describing which application has sent the key.</li>
<li>Path: A string describing which element is being sent.</li>
</ul>
<p>Remember earlier when we used a sender, path and connection to connect to the accessibility bus?
And later when we created a Proxy to an object that was sent over as part of an event?
Well, this is the same idea!
We clone the <code class="language-plaintext highlighter-rouge">Arc&lt;SyncConnection&gt;</code> connection to use the same connection to talk to dbus, and we use the sender and path to create a proxy we can then use the same methods on as the parent!</p>
<p>Pretty cool stuff!</p>
<p>Ok, now back to what I was saying about being able to grab information about children to find out if we need to replace the object replacement characters or not.
Heres what we do: there is an <a href="???">interface</a>, we talked about this earlier, called <a href="???xml">Hyperlink</a>;
the Hyperlink interface can actually tell us what cursor position inside the parent the child occupies.
Some objects we get over DBus will not support this, but the vast majority will.
I dislike the fact it is called hyperlink, even though I can see that this is the primary use case,
I think its reasonable to say that <code class="language-plaintext highlighter-rouge">StartIndex</code> and <code class="language-plaintext highlighter-rouge">EndIndex</code> are not exactly unique to hyperlinks (<code class="language-plaintext highlighter-rouge">&lt;a&gt;</code> tags).
Minor criticism aside, there is an opportunity here to match with the parent and find out if and where the child belongs to be placed.
Heres how:</p>
<p>If we get the position of every occurance of object replacement character from the parent,
and check each child to see if its <code class="language-plaintext highlighter-rouge">StartIndex</code> matches the position of the object replacement character,
then anytime it matches, that is where the child belongs.</p>
<p>There is another use for this that I would like to point out.
I think this is a reasonable case for seeing it pulled into its own interface, or joining accessible.</p>
<h2 id="structural-navigation">Structural Navigation</h2>
<p>People who use screenreaders have some special abilities I actually wish browsers implemented by default:
the ability to jump through the document by specific tags and attributes.
Its not sophisticated;
depth first search forward or backward looking for the closest heading, link, button, table, etc.
This is so ingrained in screebreader users that when a page finishes loading,
it is customary for the screenreader to announce (speak out lout to the user) the number of tables, headings, and visited and unvisited links there are on the page.</p>
<p>If I want to look for the next heading in an HTML document, however,
I can not start by just checking all children, because it is fairly common to have various tags embedded in your current tag.
I need to know, which children are after and which are before my caret.</p>
<h2 id="the-carrot">The Carrot</h2>
<p>The caret is the same as your cursor in an input box.
Type right here and watch as your cursor (aka carer) moves with your typing: <input type="text" placeholder="type here" /></p>
<p>The caret, or cursor, is something that most people are only used to seeing in the context of <em>editable</em> text,
but screenreader users enable a special mode in their browser (usually activated with F7) called “Caret Browsing”.
Caret browsing allows you to navigate through a webpage using a cursor,
even when the text is not editable.
This is <em>awesome</em>!
I can not understate how useful this is to me, just for simple keyboard-driven simplicity and trying to eliminate the mouse as much as possible.</p>
<p>Try it now! You can always turn it off with F7, just the same as enabling it.</p>
</article>
</main>
<hr>
<footer>
This page will be mirrored on <a href="https://beta.tait.tech/2021/12/11/adventures-of-writing-a-screenreader-in-rust/">beta.tait.tech</a>.
</footer>
</div>
</body>
</html>

@ -0,0 +1,46 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>ID10T Error | tait.tech</title>
<link rel="stylesheet" href="/assets/css/style.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="Tait Hoyem">
<meta name="keywords" content="">
<meta name="description" content="">
</head>
<body>
<div id="wrapper">
<header>
<h1>tait.tech</h1>
<nav>
<a href="/" class="nav-link" >Home</a>
<a href="/blog/" class="nav-link" >Blog</a>
<a href="/ideas/" class="nav-link" >Ideas</a>
<a href="/links/" class="nav-link" >Links</a>
<a href="https://github.com/TTWNO/" class="nav-link" target="_blank" rel="noopener noreferrer" >Github</a>
</nav>
</header>
<main>
# ID10T
Either you or the site administrator has commited an ID10T error.
Please find your way back to the [homepage](/) or [contact me](mailto:tait@tait.tech) to fix the problem.
</main>
<hr>
<footer>
This page will be mirrored on <a href="https://beta.tait.tech/404/">beta.tait.tech</a>.
</footer>
</div>
</body>
</html>

@ -1,3 +1,7 @@
table { table-layout: fixed; }
table { table-layout: fixed; width: 100%; }
#wrapper { max-width: 100%; }
table ul { padding: 0px; margin: 0px; }
/*# sourceMappingURL=transcription.css.map */

@ -7,8 +7,8 @@
],
"sourcesContent": [
"@import \"transcription\"\n",
"table {\n table-layout: fixed;\n}\n"
"table {\n table-layout: fixed;\n width: 100%;\n}\n\n#wrapper {\n max-width: 100%;\n}\n\ntable ul {\n padding: 0px;\n margin: 0px;\n}\n"
],
"names": [],
"mappings": "ACAA,AAAA,KAAK,CAAC,EACJ,YAAY,EAAE,KAAK,GACpB"
"mappings": "ACAA,AAAA,KAAK,CAAC,EACJ,YAAY,EAAE,KAAK,EACnB,KAAK,EAAE,IAAI,GACZ;;AAED,AAAA,QAAQ,CAAC,EACP,SAAS,EAAE,IAAI,GAChB;;AAED,AAAA,KAAK,CAAC,EAAE,CAAC,EACP,OAAO,EAAE,GAAG,EACZ,MAAM,EAAE,GAAG,GACZ"
}

@ -32,6 +32,21 @@
<main>
<h1>Blog</h1>
<article>
<header class="post-header">
<h2 class="post-title">
<a class="post-title-link" href="/2021/12/11/adventures-of-writing-a-screenreader-in-rust/">Adventures of Writing A Screenreader (in Rust)</a>
</h2>
<time class="post-date" datetime="21-12-11">
11 December 2021
</time>
</header>
<div class="post-excerpt"><p>Here are some interesting problems I have faced when working with DBus, AT-SPI (Accessible TechnologySerial Protocol Interface) and the Rust programming language.
I realize these are fairly unique constraints, and this information is likely only relevant for a select few, but I thought the experience might be worthwhile to write down:
for my own sanity when I inevitably experience these same issues later and for others who may want to contribute to our new screen reader project <a href="https://yggdrasil-sr.github.io">Odilia</a>.</p>
</div>
</article>
<article>
<header class="post-header">
<h2 class="post-title">

@ -33,7 +33,7 @@
<article>
<header>
<h1 class="post-title">Canadian History For Dummies</h1>
<time datetime="21-11-25" class="post-date">Thursday, November 25 2021</time>
<time datetime="21-12-12" class="post-date">Sunday, December 12 2021</time>
</header>
<hr>

@ -1,12 +1,214 @@
<<<<<<< HEAD
<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.2.1">Jekyll</generator><link href="http://localhost:4000/feed.xml" rel="self" type="application/atom+xml" /><link href="http://localhost:4000/" rel="alternate" type="text/html" /><updated>2021-11-28T18:08:20-07:00</updated><id>http://localhost:4000/feed.xml</id><entry><title type="html">How To Produce Semantically Correct MathML From XaTeX/LaTeX (and other accessibility ideas)</title><link href="http://localhost:4000/2021/09/18/how-to-generate-proper-content-mathml-from-katex-or-latex/" rel="alternate" type="text/html" title="How To Produce Semantically Correct MathML From XaTeX/LaTeX (and other accessibility ideas)" /><published>2021-09-18T00:00:00-06:00</published><updated>2021-09-18T00:00:00-06:00</updated><id>http://localhost:4000/2021/09/18/how-to-generate-proper-content-mathml-from-katex-or-latex</id><content type="html" xml:base="http://localhost:4000/2021/09/18/how-to-generate-proper-content-mathml-from-katex-or-latex/">During a recent run-in with the Simon Fraser Fraser University accessibility department,
<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.2.1">Jekyll</generator><link href="http://localhost:4000/feed.xml" rel="self" type="application/atom+xml" /><link href="http://localhost:4000/" rel="alternate" type="text/html" /><updated>2021-12-22T16:50:05-07:00</updated><id>http://localhost:4000/feed.xml</id><entry><title type="html">From Software Deveoper To Accessible Technology Master</title><link href="http://localhost:4000/2021/12/11/adventures-of-writing-a-screenreader-in-rust/" rel="alternate" type="text/html" title="From Software Deveoper To Accessible Technology Master" /><published>2021-12-11T00:00:00-07:00</published><updated>2021-12-11T00:00:00-07:00</updated><id>http://localhost:4000/2021/12/11/adventures-of-writing-a-screenreader-in-rust</id><content type="html" xml:base="http://localhost:4000/2021/12/11/adventures-of-writing-a-screenreader-in-rust/">Here are some interesting problems I have faced when working with DBus, AT-SPI (Accessible Technology--Serial Protocol Interface) and the Rust programming language.
I realize these are fairly unique constraints, and this information is likely only relevant for a select few, but I thought the experience might be worthwhile to write down:
for my own sanity when I inevitably experience these same issues later and for others who may want to contribute to our new screen reader project [Odilia](https://yggdrasil-sr.github.io).
## DBus
[DBus](???) is a cool API!
Well it&apos;s not an API, but rather a mechanism to share messages across processes in Linux;
this is generally called IPC or Inter-Process Communication.
DBus can be used to [send and receive desktop notifications](???),
[shutdown your computer](???)
and, for my purposes [get accessibility events](???).
### Inner Workings
DBus is an object-oriented approach to IPC.
It is split up into 3 main components that work together:
1. Objects
2. Interfaces
3. Methods
#### Objects
Objects are just like objects you learned in your CS classes;
it is a structure which contains attributes, and methods which can be called on the object.
DBus&apos; objects are very similar, except that attributes are called properties.
Most DBus libraries provide a way for you to use &quot;native objects&quot; (i.e., a Python object, a C++ object, a Rust structure + implementation, etc.); this allows access to DBus methods using the language features available to you.
So for example, in Python you might write:
```python
obj = some_function()
print(obj.get_text()) # using a method
print(obj.locale) # using a property
```
This would print out whatever may be returned from the object&apos;s GetText method.
Notice that DBus methods are always camel case (i.e., capitalized at each starting letter of a word).
// TODO might not be camel
#### Interfaces
A DBus interface (not to be confused with a Java interface, or a Rust trait) is a collection of methods.
### Accessibility Events &amp;amp; Information
What kind of events are &quot;accessibility events&quot;?
Let&apos;s assume for a moment that you cannot see anything. You are blind.
If you try to read an article you obviously cannot see what is on your screen, so you need something to read it to you.
This technology that reads your screen to you is, uncreativly (TODO) called a screenreader, sometimes abbreviated &quot;SR&quot;.
Well how does a screen reader know what is on the screen? How does it know what a button is? And a link?
How does it know if content has changed or if an alert has been sent?
The former describes accessibility information (i.e., this button contains a certain string of text);
the latter describes an accessibility event (an `aria-live` region has been updated, or an alert box has been displayed).
DBus, Linux&apos;s IPC mechanism, can send these events and information to you, if you ask for it.
This is what I want if I&apos;m to create anything like a screenreader.
I will show a minimal example of how to do this in Rust.
```rust
# register with registry
# get a match rule on org.a11y.Bus
# receive ObjectChanged events
```
(EXPLAIN)
...The specification that is used to send this information to our DBus connection is called AT-SPI: Accessible Technology--Serial Protocol Interface.
## AT-SPI
AT-SPI are a set of XML files that specify *how* to send data across DBus.
I&apos;m going to be honest: at first this system *seems* very convoluted and unnecessarily complex.
Over time though, this system has grown on me as I start to see its &quot;complexities&quot; as a sort of after-affect of the core principle of *simplicity* used within DBus and the specifications which use it.
I&apos;ve already explained (TODO) that DBus has a system of narrowing things down in the order: 1) bus, 2) path, 3) interface and 4) method.
???
So let&apos;s say we want to implement the most basic thing a screenreader can do: read text.
Let&apos;s suppose we already have an item we want to get the text of.
Now to get the text of it, we call a method on the interface and pass the path.
This is abstracted away for us, generally speaking, when using any kind of language-specific DBus binding, but it&apos;s better to be explicit in this case.
No problem! We call `item.get_text()` and that&apos;s it, right?
No.
This is where, again, this &quot;complexity&quot; comes in.
Again, it starts out this way, but it will grow on anyone who enjoys the idea of the UNIX principles with time and understanding.
So what happens if we do `obj.get_text()`?
Let&apos;s try it on the first list item on my website&apos;s [homepage](/):
Here is the excerpt as it is currently written:
&gt; I have three goals in my software development career:
&gt; 1. Strong adherence to the &lt;a href=&quot;https://?&quot;&gt;UNIX principles&lt;/a&gt; of software design.
&gt; 2. Security, privacy and anonymity of the internet.
&gt; 3. Accessibility of technology to the visually impaired.
What would you expect to receive if you ran `get_text()` on the first list item there?
If you, like me, were a little brainlette, you probably guessed &quot;1. Strong adherence to the UNIX Principles of software design.&quot;
Let&apos;s find out how well that works...
```rust
let text = acc.get_text();
println!(&quot;TEXT: \&quot;{}\&quot;&quot;, text);
$ cargo run
TEXT: &quot;1. Strong aherance to the of software design.&quot;
```
If you read that carefully, you&apos;ll see there are what look like three speces where the UNIX principles link should go.
This is *extremely* deceptive for two reasons:
1. One of those is *NOT* a space. It&apos;s an [Object Replacement Character](https;//???) aka Unicode Point U+FFFC.
2. It looks like it has just dropped a piece of text without telling us! And without a way to get it back! *Gasp!* Oh the horror!
This is what I thought too.
But let me defend this for a minute.
What if you had something complex like a table, a block quote, an image or even something like a [MathML](example) equation inside the block of text (in our case, inside a list item, but this applies to any piece of text inside another)?
If you had a table, would you want to read it out?
MathML, you might want to say everything upfront, but MathML would need some amount of processing before it be readable as text.
And even with a link, there is a reason for this.
If you can see perfectly find and browse the web like anyone else, with your eyes, you can see what is a visited and unvisited link based on the color of the link. A darker color generally indicated a visited link,
whereas a lighted color generally indicates an unvisited link.
When a screenreader gets info about a piece of text, it would need to include that information to its user like &quot;UNIX princples...link&quot; or &quot;UNIX principles...visited link&quot;.
So if I get the text of some item which contains another, should it include all sub items? What about just links? Should it tell you if the link is visited or not?
It gets fairly complicated really quickly, and this has given me pause in my youthful &quot;the system is broken&quot; angst that generally plagues my thinking;
instead I see this is a very sober-minded and UNIX-y design principle that I think makes much more sense than the alternative.
Here are some major advantages of this method:
1. It allows *optional* processing of sub-elements; maybe you don&apos;t care what is underneath the element: this saves processing power and complexity.
2. It allows *custom* processing of sub-elements; you do not have to rely on AT-SPI to tell you what information you want. Perhaps you only need the role of the sub element, not the entire text of it: again, this saves CPU cycles and code complexity.
3. Allows arbitrary data to be inside any other structural element. This is optimal for HTML, which is built to be entirely arbitrary when it comes to how much data is encoded into one tag. (TODO write it better).
This is actually genius design!
My next question was: &quot;If it uses the object replacement cahracter so it can replace the children, then what happens if the object replacement character is actually in the text?&quot;
Well, with some processing you can actually find out where each child goes, or if the object replacement character is actually written in the text itself.
How so?
First off, let&apos;s get a list of children.
We can do this with `acc.get_children()`.
```rust
println!(&quot;CHILDREN: {:?}&quot;, acc.get_children().await.unwrap());
$ cargo run
CHILDREN: [(&quot;:1.7&quot;, Path(&quot;/org/a11y/atspi/accessible/193\u{0}&quot;)), (&quot;:1.7&quot;, Path(&quot;/org/a11y/atspi/accessible/194\u{0}&quot;))]
```
You&apos;ll notice that the children are merely a list of tuples;
each tuples only contains, at its core, two strings:
* Sender: A string describing which application has sent the key.
* Path: A string describing which element is being sent.
Remember earlier when we used a sender, path and connection to connect to the accessibility bus?
And later when we created a Proxy to an object that was sent over as part of an event?
Well, this is the same idea!
We clone the `Arc&lt;SyncConnection&gt;` connection to use the same connection to talk to dbus, and we use the sender and path to create a proxy we can then use the same methods on as the parent!
Pretty cool stuff!
Ok, now back to what I was saying about being able to grab information about children to find out if we need to replace the object replacement characters or not.
Here&apos;s what we do: there is an [interface](???), we talked about this earlier, called [Hyperlink](???xml);
the Hyperlink interface can actually tell us what cursor position inside the parent the child occupies.
Some objects we get over DBus will not support this, but the vast majority will.
I dislike the fact it is called hyperlink, even though I can see that this is the primary use case,
I think it&apos;s reasonable to say that `StartIndex` and `EndIndex` are not exactly unique to hyperlinks (`&lt;a&gt;` tags).
Minor criticism aside, there is an opportunity here to match with the parent and find out if and where the child belongs to be placed.
Here&apos;s how:
If we get the position of every occurance of object replacement character from the parent,
and check each child to see if its `StartIndex` matches the position of the object replacement character,
then anytime it matches, that is where the child belongs.
There is another use for this that I would like to point out.
I think this is a reasonable case for seeing it pulled into its own interface, or joining accessible.
## Structural Navigation
People who use screenreaders have some special abilities I actually wish browsers implemented by default:
the ability to jump through the document by specific tags and attributes.
It&apos;s not sophisticated;
depth first search forward or backward looking for the closest heading, link, button, table, etc.
This is so ingrained in screebreader users that when a page finishes loading,
it is customary for the screenreader to announce (speak out lout to the user) the number of tables, headings, and visited and unvisited links there are on the page.
If I want to look for the next heading in an HTML document, however,
I can not start by just checking all children, because it is fairly common to have various tags embedded in your current tag.
I need to know, which children are after and which are before my caret.
## The Carrot
The caret is the same as your cursor in an input box.
Type right here and watch as your cursor (aka carer) moves with your typing: &lt;input type=&quot;text&quot; placeholder=&quot;type here&quot;&gt;
The caret, or cursor, is something that most people are only used to seeing in the context of *editable* text,
but screenreader users enable a special mode in their browser (usually activated with F7) called &quot;Caret Browsing&quot;.
Caret browsing allows you to navigate through a webpage using a cursor,
even when the text is not editable.
This is *awesome*!
I can not understate how useful this is to me, just for simple keyboard-driven simplicity and trying to eliminate the mouse as much as possible.
Try it now! You can always turn it off with F7, just the same as enabling it.</content><author><name></name></author><category term="atspi," /><category term="dbus," /><category term="dbus" /><category term="a11y," /><category term="accessibility," /><category term="a11y," /><category term="linux," /><category term="linux" /><category term="a11y" /><summary type="html">Here are some interesting problems I have faced when working with DBus, AT-SPI (Accessible TechnologySerial Protocol Interface) and the Rust programming language. I realize these are fairly unique constraints, and this information is likely only relevant for a select few, but I thought the experience might be worthwhile to write down: for my own sanity when I inevitably experience these same issues later and for others who may want to contribute to our new screen reader project Odilia.</summary></entry><entry><title type="html">How To Produce Semantically Correct MathML From XaTeX/LaTeX (and other accessibility ideas)</title><link href="http://localhost:4000/2021/09/18/how-to-generate-proper-content-mathml-from-katex-or-latex/" rel="alternate" type="text/html" title="How To Produce Semantically Correct MathML From XaTeX/LaTeX (and other accessibility ideas)" /><published>2021-09-18T00:00:00-06:00</published><updated>2021-09-18T00:00:00-06:00</updated><id>http://localhost:4000/2021/09/18/how-to-generate-proper-content-mathml-from-katex-or-latex</id><content type="html" xml:base="http://localhost:4000/2021/09/18/how-to-generate-proper-content-mathml-from-katex-or-latex/">During a recent run-in with the Simon Fraser Fraser University accessibility department,
I learned that they&apos;re writers are so well-trained as to write &quot;image&quot; where a simple diagram is shown,
and &quot;print out picture of output&quot; where a piece of code lies.
=======
<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.2.0">Jekyll</generator><link href="/feed.xml" rel="self" type="application/atom+xml" /><link href="/" rel="alternate" type="text/html" /><updated>2021-11-25T21:47:55-07:00</updated><id>/feed.xml</id><entry><title type="html">How To Produce Semantically Correct MathML From XaTeX/LaTeX (and other accessibility ideas)</title><link href="/2021/09/18/how-to-generate-proper-content-mathml-from-katex-or-latex/" rel="alternate" type="text/html" title="How To Produce Semantically Correct MathML From XaTeX/LaTeX (and other accessibility ideas)" /><published>2021-09-18T00:00:00-06:00</published><updated>2021-09-18T00:00:00-06:00</updated><id>/2021/09/18/how-to-generate-proper-content-mathml-from-katex-or-latex</id><content type="html" xml:base="/2021/09/18/how-to-generate-proper-content-mathml-from-katex-or-latex/">&lt;p&gt;During a recent run-in with the Simon Fraser Fraser University accessibility department,
I learned that theyre writers are so well-trained as to write “image” where a simple diagram is shown,
and “print out picture of output” where a piece of code lies.
>>>>>>> ca770be68ffdcb836bbddb3a47786c64f4f717a7
I figure the geniuses over there could use some help creating files for the visually impaired.
Here&apos;s a quick guide!
@ -1035,95 +1237,4 @@ In fact, it is very likely I would have never figured that one out.
After this issue is resolved, the installation of `pacaur` goes as expected. Nice and easy!
Pacuar will compile on any architecture so it&apos;s smooth sailing from here.
Happy hacking!</content><author><name></name></author><summary type="html">I recently installed Manjaro ARM (based on Arch Linux ARM) on a Raspberry Pi 4. I used some standard commands to start to add the pacaur package so I can easily retrieve AUR packages without needing to do it manually. Unfortunately, there is a small problem with compiling this on ARM.</summary></entry><entry><title type="html">ZFS NAS Box, Part 2</title><link href="http://localhost:4000/2020/11/15/nas2/" rel="alternate" type="text/html" title="ZFS NAS Box, Part 2" /><published>2020-11-15T00:00:00-07:00</published><updated>2020-11-15T00:00:00-07:00</updated><id>http://localhost:4000/2020/11/15/nas2</id><content type="html" xml:base="http://localhost:4000/2020/11/15/nas2/">Back in [part one of my NAS project]({% post_url 2020-04-12-nas1 %}) I discussed how I wanted to set up my hardware.
Today, I set up the NAS (almost).
There were some hiccup along the way, like learning that M.2 slots can disable some of your SATA ports or waiting a month for a host bus adapter to come in from China.
## Why Did It Take So Long
So it turns out I was going to spend a lot more on this project than I originally anticipated.
I ended up getting a server machine instead of a sleek NAS box.
Here are some of the quick specs:
* Standard ATX case by Thermaltake.
* LSI 9211-8i.
* The cheapest HDMI graphics card I could find on Kijiji.
* 6x 3TB Segate HDDs.
* 1x 250G Kingston SSD.
* AMD Ryzen 5 3600.
* MSI B450 Gaming Plus Max.
* 2x 8GB FlareX 3200Mhz RAM.
* 1x 16GB Kingston 3200Mhz RAM.
## ZFS
This is how I decided to configure my storage pools.
In hindsight, this was not the best choice for upgrading.
I may change it in the future to a 0+1 setup, but it works for now.
I have 5x 3TB in a RAIDZ2 with one drive not attached for redundancy&apos;s sake.
How does one setup a ZFS pool. Check this out:
&lt;pre class=&quot;terminal&quot;&gt;
# zpool create poolname raidz2 \
/dev/by-id/blahblahblah1 \
/dev/by-id/blahblahblah2 \
/dev/by-id/blahblahblah3 \
/dev/by-id/blahblahblah4 \
/dev/by-id/blahblahblah5
&lt;/pre&gt;
And zippidy-doo! We&apos;ve got a ZFS pool!
We can check its status with `zpool status`.
&lt;pre class=&quot;terminal&quot;&gt;
$ zfs status
pool: raid
state: ONLINE
scan: scrub in progress since Wed Nov 18 18:41:41 2020
1.84T scanned at 8.51G/s, 121G issued at 562M/s, 1.84T total
0B repaired, 6.45% done, 0 days 00:53:25 to go
config:
NAME STATE READ WRITE CKSUM
raid ONLINE 0 0 0
raidz2-0 ONLINE 0 0 0
ata-HGST_HUS724030ALA640_PN2234P8JTNMYY ONLINE 0 0 0
ata-HGST_HUS724030ALA640_PN2234P8JVSXTY ONLINE 0 0 0
ata-HGST_HUS724030ALA640_PN2234P8JXAS8Y ONLINE 0 0 0
ata-HGST_HUS724030ALA640_PN2234P8JXBARY ONLINE 0 0 0
ata-HGST_HUS724030ALA640_PN2234P8JXP77Y ONLINE 0 0 0
errors: No known data errors
&lt;/pre&gt;
I had run a scrub right before this, so there&apos;s some extra detail in that.
This is really fun! I will be doing more home storage projects soon.
Perhaps Raspberry Pi NAS using all 4 USB ports to load SATA drives on it.
Now that would be fun!
## So I Kinda Have A NAS Now...?
So right now I can only copy files with `rsync`, `scp` and moving data via a physical drive.
The one major disadvantage this has is speed.
Due to this machine being connected directly outside my network and pulling DHCP like a normal router would, I need to send my data through the WAN connection to get my files to it.
This is rather unfortunate as my upload speed is capped at 20 megabits per second, despite my upload being in the 300+ range.
Part 3 will involve a LAN card so I can connect both to the DHCP server of my ISP and my local router.
This way my transfer speeds should be in the range of 1 gigabit per second.
This will make my life much easier, at least on the local network.
## Fun Fact!
Do not try to use the M.2 slot on a consumer motherboard where you are also using all the SATA ports.
On my consumer gaming motherboard, the SATA ports next to the M.2 slot became *disabled* when I attached the M.2 SSD.
I found this out form my motherboard documentation, which I read only after a week of thinking my motherboard itself was defective, and sending it in for repairs that did absolutely nothing.
## Thoughts
I like having all this space. I plan on using it up pretty fast, so I&apos;m already looking at how to expand.
Hopefully that gives a decent overview of how I set up my drives.
Happy hacking!</content><author><name></name></author><summary type="html">Back in part one of my NAS project I discussed how I wanted to set up my hardware. Today, I set up the NAS (almost).</summary></entry></feed>
Happy hacking!</content><author><name></name></author><summary type="html">I recently installed Manjaro ARM (based on Arch Linux ARM) on a Raspberry Pi 4. I used some standard commands to start to add the pacaur package so I can easily retrieve AUR packages without needing to do it manually. Unfortunately, there is a small problem with compiling this on ARM.</summary></entry></feed>

@ -67,6 +67,7 @@
</li>
</ul>
</li>
<li><a href="#12-meme-template-regocnition" id="markdown-toc-12-meme-template-regocnition">12. Meme Template Regocnition</a></li>
</ul>
<div id="toc-skipped"></div>
@ -436,6 +437,7 @@ Obviously, you would need some kind of anonymization feature to stop people from
Or, depending on the verbosity of the data, a way to “smooth out” the exact cane movements so as not to identify the cane holder.</p>
<p>Having a centralized place to store these maps (for the public, all the data should be useable and clonable) could potentially make it so there is only one blind student who needs to navigate the campus a few times and then be able to share that data with everyone else.</p>
<h4 id="extensions">Extensions</h4>
<p>Perhaps it could even be extended with such thinks like “there is a sign which says XYZ here or ABC there”?
@ -455,8 +457,15 @@ perhaps there is the possibility of using something like this just inside univer
I could understand if this wouldnt beat Google maps most times;
that said, its a route another white-cane user has <em>exactly</em> taken before, so it is gaurenteed to work unless something in the environment has changed since then. // TODO</p>
<p>Obviously there are a lot of other things to consider like user privacy and how to avoid the sensor signals from the cane from getting either lost, intercepted, modified, etc.
Security is <em>always</em> a concern, no matter how remote the possibility is of some kind of attack.</p>
<p>Obviously there are a lot of other things to consider like user privacy and how to avoid the sensor signals from the cane from getting either lost, intercepted, modified, etc.</p>
<p>Security is <em>always</em> a concern, no matter how remote the possibility is of some kind of attack.</p>
<h2 id="12-meme-template-regocnition">12. Meme Template Regocnition</h2>
<p>Meme Template Recognition (MTR) should OCR the plain text found in a meme, and also lookup the closest match in terms of which meme template is used.
Have each template with a description of the meme and how it is generally used.</p>
</main>
<hr>

@ -17,7 +17,7 @@
<ul class="clear-list">
<li>
<strong>Zone4 Systems Inc.</strong> &mdash; <em>Software Developer</em> (June 2021-present)
<strong>Zone4 Systems Inc.</strong> &mdash; <em>Software Developer</em> (June 2021-December 2021)
<p>Software development and QA (testing) for an international race timing company based in Canmore, AB. Testing using unittest and Selenium. Development done in Javascript and Tornado. Zone4 was founded in 2001 by Canadian Olympian Dan Roycroft.</p>
</li>
@ -37,7 +37,7 @@
<li>
<strong>Independent</strong> &mdash; <em>Tutoring/Transcribing</em> (2019-present)
<p>Working with computer science students explaining introductory to advanced concepts. Covering languages from C/C++ to Javascript to Python. I am skilled in working with students who have visual impairments: transcribing inaccessible computer code (from images or a screen-share) and presenting complex math equations in an accessible format.</p>
<p>Working with computer science students explaining introductory to advanced concepts. Covering languages from C/C++ to Javascript to Python. I am skilled in working with students who have visual impairments: transcribing inaccessible computer code (from images or a screen-share) and presenting complex math equations and diagrams in an accessible format.</p>
</li>
<li>
@ -59,7 +59,7 @@
</li>
<li>
<strong>Southern Alberta Institute of Technology</strong> &mdash; Diploma / <em>Information Technology &#x2014; Software Development Major</em> (2019-2021)
<strong>Southern Alberta Institute of Technology</strong> &mdash; Diploma / <em>Information Technology Software Development Major</em> (2019-2021)
<p>Full-stack two year software development diploma. Focusing on databases, interface design, systems administration, security and enterprise solutions.</p>
@ -166,7 +166,7 @@
</ul>
<h3>Frameworks/Environments</h3>
<h3>Frameworks/Environments/Libraries</h3>
<ul>
<li>Flask</li>
@ -177,18 +177,22 @@
<li>Jekyll</li>
<li>Tornado</li>
</ul>
<h3>Miscellaneous/Hobbies</h3>
<ul>
<li>Git</li>
<li>3D Printing</li>
<li>Proxmox Virtualization</li>
<li>Embedded Systems (RPi, ESP-compatible)</li>
<li>Founder &amp; Ex-President of SAIT's Free &amp; Open-Source Software Club</li>
<li>Founder &amp; Ex-President of Southern Alberta Institute of Technology's Free &amp; Open-Source Software Club</li>
</ul>

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save