Posts

Showing posts from October, 2026

Big text on charts and graphs on webpage

Image
 I now make the text on charts and graphs really big. This is because mobiles shrink the charts because the mobiles have 2 or 3 times pixel density. Their browsers choose a large size of a chart and scale it back. Also mobile browsers may be set to a 'desktop view' which again shrinks down a large size chart. The idea of a 'desktop view' is stop the browser showing a 'cut-down' view of a website coded for mobiles. I check for 'desktop view' with:     'window.innerWidth > screen.availWidth' The text includes chart titles, axis titles, numbers on tics and legends. I am trying using JavaScript to set the 'src' of images to force the browser to choose more readable smaller-sized charts. But this makes the browser load all the charts when the page loads - no more easy 'lazy loading'. Also there needs to be a bit of code to handle resizing the page.

Saving screenshots into a file on Windows 11

Image
 I use the 'jspaint.app' website to get screenshots into a file. There is no Windows Paint program on Windows 11. I have to choose 'edit | paste' to enter the screenshot. Just pressing 'Ctrl V' gives an error. I have to remove a light grey border that 'jspaint' adds. Some other online paint program have limits on how many images you can save. I take a screenshot by pressing the 'Ctrl' and 'PrintScreen' keys together on Windows.

Using 'aria-label' to give an accessible name to a link

Image
 I use an 'aria-label' attribute of a link to give an accessible name that is read by a screen reader when I do not want to change the link's text. In one case I split up the letters of the link text using JavaScript so I can color the letters individually. I really want to put the word after the link text inside the link text, but I use this word as an anchor when I parse the HTML and I do not want to change this old code. The 'Wave' tool from 'webaim.org' shows the accessible names of all navigable page elements in its 'Order' tab.

Chrome Lighthouse bug

Image
 Chrome's Lighthouse said there was an error with the links on my page. I checked the links. I thought maybe I had some generic link text such as 'click here'. I thought maybe the problem was that one of links is hidden on mobiles. Then I noticed the tip on the error message:     Required AnchorElements gatherer encountered an error: Cannot read properties of undefined (reading 'objectId') I found an issue raised with Chrome on 'github'. I tried removing non-breaking spaces from the page and the error went away. I will leave the spaces in and wait until the bug is fixed in Lighthouse.