A little bit of background. The W3C chartered the Web Accessibility Initiativehttps://www.w3.org/WAI/ as the central place to gather information, research, best practices, and standards recommendations in W3C talk for accessibility on the web. The best-known resource generated by the WAI is the Web Content Accessibility Guidelines WCAGhttps://www.w3.org/WAI/standards-guidelines/wcag/ recommendation. The current version of WCAG is 2.1https://www.w3.org/TR/WCAG/ with a draft of version 2.2https://www.w3.org/TR/WCAG22/ expected to become a recommendation soon and an earlier draft of version 3https://www.w3.org/TR/wcag3/ as an early working draft. The current version of WCAG provides two guidelines regarding accessibility: > Success Criterion 1.4.3 Contrast Minimum The visual presentation of text...
After looking at format and tech discussed in the Updates to @font-facehttps://publishing-project.rivendellweb.net/updates-to-font-face/ I thought it would be good to look at other aspects of the @font-face at-rule that changed or are new since the last time I looked at. font-weight, font-style, and font-stretch These descriptors will still work with a single value. font-weighthttps://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-weight and font-stretchhttps://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-stretch can take two values to represent the lower and upper boundaries of the variable font range for the descriptor. font-stylehttps://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-style can also use ranges but it's a little more complex than font-weight and font-stretch. The possible values for the descriptor are: normal : Selects the...
@font-face has been around for a while and it works fine for the existing monochrome, one file per style, fonts. CSS Fonts level 4https://w3c.github.io/csswg-drafts/css-fonts/ introduced a new property related to font types tech to the src attribute of @font-face at-rules. I also looked again at the format attribute of the src descriptor; particularly what benefits would we get from using it. We will discuss each of these in turn. format This attribute specifies the font format of the font it is attached to. If the value for format is not supported or invalid, the browser will not download the resource,...
Starting in WordPress 6.1 fonts can be fully defined in theme.json including adding variable fonts to the list of available fonts. The fontFace syntax in the theme.json file is very similar to what you would use when defining a font using the @font-facehttps://developer.mozilla.org/en-US/docs/Web/CSS/@font-face at-rule, as described in the @font-facehttps://developer.mozilla.org/en-US/docs/Web/CSS/@font-face entry in MDNhttps://developer.mozilla.org/en-US/ and explained in this CSS Trickshttps://css-tricks.com/snippets/css/system-font-stack/ article. System Fonts The first example uses fonts that are known to be in the system. These are the default fonts across operating systems and the browser will pick the first font it supports. The font-family attribute contains a list of fonts...
When you start a new site for developing the site has no data and there is no way to see what the theme would look like with content in it. We will discuss three approaches to populating a theme with data to see what it would look like: 1. Cloning the data from your production site 2. Using WordPress Theme Datahttps://github.com/WPTT/theme-test-data 3. Using Gutenberg Test Datahttps://github.com/Automattic/theme-tools/tree/master/gutenberg-test-data Each of these strategies addresses different needs and use cases. Cloning data from your production site The easiest way to get data for your development system is to take the data from your production...
There are times when you don't want Google search to index specific pages on your site. It may be because these are private pages that, for some reason, are not password protected; or the site needs to be available to the client during development and you don't want to put it behind a password. This post will present two ways of blocking Google crawlers from indexing your site: server response headers and client-side meta tags. Using Server Response Headers The easiest way to add the headers is to do so in your server configuration. To disable search engine indexing globally...
Most of the time media queries in CSS will work fine for what we want to do but there are times when just having the media queries will not be enough. The first example that I can think of is doing something based on changes to the preferred color scheme. While the CSS Media Query should be enough to do the work, we can't be certain it will. Before you can evaluate the results of a media query, you need to create the MediaQueryList object representing the query. To do this, use the window.matchMediahttps://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia method. To detect changes to the...
CSS logical propertieshttps://publishing-project.rivendellweb.net/working-with-logical-properties-and-writing-modes/ provide a way to style elements based on the direction the language is written in left to right, right to left or top to bottom. Defining terms To better understand logical properties, we need to work with the following terms: Block dimension : The dimension perpendicular to the flow of text within a line, i.e., the vertical dimension in horizontal writing modes, and the horizontal dimension in vertical writing modes : For standard English text, it is the vertical dimension. Inline dimension : The dimension parallel to the flow of text within a line, i.e., the horizontal...
Uploading videos to YouTube in a given format doesn't mean that's the format that will play for all users. Most of the time we don't notice but YouTube will re-encode the video we upload into multiple videos using different codecs at different bitrate/resolution combinations. According to the first article, Which Codecs Does YouTube Use?https://streaminglearningcenter.com/codecs/which-codecs-does-youtube-use.html, the version of your video that you will get is based on the number of views the video has accumulated. As far as I understand it, the list goes like this The default conversion is to MP4 with a resolution of up to 1080p. When a...
When preparing a video for uploading to YouTube, it's tempting to go to the top of the line and choose to upload the biggest or the smallest file possible and see what YouTube does with it. If you're working with the YouTube Content Manager, this support articlehttps://support.google.com/youtube/answer/1722171?hl=en explains what the settings for that specific encoding settings are to use when using that product. Otherwise, we can use the following media formats: .MOV .MPEG-1 .MPEG-2 .MPEG4 .MP4 .MPG .AVI .WMV .MPEGPS .FLV 3GPP WebM DNxHR ProRes CineForm HEVC h265 We will discuss how to encode a video into two versions: One...