{"id":1340,"date":"2020-04-20T08:00:05","date_gmt":"2020-04-20T15:00:05","guid":{"rendered":"https:\/\/blogs.lanecc.edu\/webteam\/?p=1340"},"modified":"2020-04-14T00:26:07","modified_gmt":"2020-04-14T07:26:07","slug":"more-accessible-phone-numbers","status":"publish","type":"post","link":"https:\/\/blogs.lanecc.edu\/webteam\/2020\/04\/20\/more-accessible-phone-numbers\/","title":{"rendered":"More accessible phone numbers"},"content":{"rendered":"<p>In the <a href=\"https:\/\/blogs.lanecc.edu\/webteam\/2020\/04\/06\/does-phone-number-format-matter\/\">last post<\/a>, I learned that not only does phone number format matter from an SEO perspective, but phone numbers can be really annoying to the blind. Depending on the screen reader, a phone number like 541-463-3000 could be read as &#8220;five hundred forty-one dash four hundred sixty-three dash three thousand&#8221;. That seems terribly annoying.<\/p>\n<p>I started out trying to implement the solution at the end of <a href=\"https:\/\/thatdevgirl.com\/blog\/accessibility-phone-number-formatting\">this blog post<\/a>, but then my curiosity got the best of me, and I got digging deep into CSS speech modules. It looks like <a href=\"http:\/\/www.nicksmith.co.uk\/blog\/2007\/11\/09\/does-your-screen-reader-read-phone-numbers-properly\/\">support is limited<\/a> even though they&#8217;re <a href=\"https:\/\/medium.com\/@Zwenza\/the-css-speech-module-8672a87a4764\">so cool<\/a>! But the limited support means I&#8217;m going to stay away.<\/p>\n<p>Instead, we&#8217;re back to the regular expressions replacements, using the Drupal <a href=\"https:\/\/www.drupal.org\/project\/customfilter\">custom filter module.<\/a> Currently, we look for<\/p>\n<pre>\/\\((\\d{3})\\) (\\d{3}-\\d{4})\/<\/pre>\n<p>And then replace it with<\/p>\n<pre> &lt;a class=\"telephone_link\" href=\"tel:+1-${1}-${2}\"&gt;${0}&lt;\/a&gt;<\/pre>\n<p>Over the last few days, we&#8217;ve changed that to grab each number individually:<\/p>\n<pre>\/\\(((\\d)(\\d)(\\d))\\) ((\\d)(\\d)(\\d)-(\\d)(\\d)(\\d)(\\d))\/<\/pre>\n<p>and replace it with something much, much longer:<\/p>\n<pre>&lt;a class=\"telephone_link\" href=\"tel:+1-${1}-${5}\" aria-label=\"${2} ${3} ${4}. ${6} ${7} ${8}. ${9} ${10} ${11} ${12}\"&gt;${1}-${5}&lt;\/a&gt;<\/pre>\n<p>It&#8217;s a bit of an ugly regular expression, but not only will this hopefully make a better experience for screen reader users, it&#8217;ll also introduce a new phone number format as currently recommended by the AP: 541-463-3000.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the last post, I learned that not only does phone number format matter from an SEO perspective, but phone numbers can be really annoying to the blind. Depending on the screen reader, a phone number like 541-463-3000 could be read as &#8220;five hundred forty-one dash four hundred sixty-three dash three thousand&#8221;. That seems terribly &hellip; <a href=\"https:\/\/blogs.lanecc.edu\/webteam\/2020\/04\/20\/more-accessible-phone-numbers\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;More accessible phone numbers&#8221;<\/span><\/a><\/p>\n","protected":false},"author":86,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":"","_wpscppro_dont_share_socialmedia":false,"_wpscppro_custom_social_share_image":0,"_facebook_share_type":"","_twitter_share_type":"","_linkedin_share_type":"","_pinterest_share_type":"","_linkedin_share_type_page":"","_instagram_share_type":"","_medium_share_type":"","_threads_share_type":"","_google_business_share_type":"","_selected_social_profile":[],"_wpsp_enable_custom_social_template":false,"_wpsp_social_scheduling":{"enabled":false,"datetime":null,"platforms":[],"status":"template_only","dateOption":"today","timeOption":"now","customDays":"","customHours":"","customDate":"","customTime":"","schedulingType":"absolute"},"_wpsp_active_default_template":true},"categories":[3],"tags":[6,25],"class_list":["post-1340","post","type-post","status-publish","format-standard","hentry","category-drupal","tag-accessibility","tag-drupal"],"_links":{"self":[{"href":"https:\/\/blogs.lanecc.edu\/webteam\/wp-json\/wp\/v2\/posts\/1340","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.lanecc.edu\/webteam\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.lanecc.edu\/webteam\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.lanecc.edu\/webteam\/wp-json\/wp\/v2\/users\/86"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.lanecc.edu\/webteam\/wp-json\/wp\/v2\/comments?post=1340"}],"version-history":[{"count":1,"href":"https:\/\/blogs.lanecc.edu\/webteam\/wp-json\/wp\/v2\/posts\/1340\/revisions"}],"predecessor-version":[{"id":1341,"href":"https:\/\/blogs.lanecc.edu\/webteam\/wp-json\/wp\/v2\/posts\/1340\/revisions\/1341"}],"wp:attachment":[{"href":"https:\/\/blogs.lanecc.edu\/webteam\/wp-json\/wp\/v2\/media?parent=1340"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.lanecc.edu\/webteam\/wp-json\/wp\/v2\/categories?post=1340"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.lanecc.edu\/webteam\/wp-json\/wp\/v2\/tags?post=1340"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}