How to Edit a WordPress Header (5 Easy Ways)

Featured Imgs 21
How to edit a WordPress header.When you install a WordPress theme, you’ll get a built-in header that sits at the top of your site. However, this header design is often quite basic and might not include the elements you want. Therefore, you might be wondering how to edit a WordPress header. In this post, we’ll take a closer look at why you might want to edit a WordPress header. Then, we’ll show you the ways to do it.

Remove WordPress Themes – How to Uninstall in Under a Minute

Featured Imgs 26

WordPress (WP) is an industry-leading web publishing platform with a content management system (CMS) that’s easy to use, SEO-friendly, and completely free. One of the main advantages of using WP over other popular alternatives is its high degree of customizability due to its vast library of themes. In WordPress, themes […]

The post Remove WordPress Themes – How to Uninstall in Under a Minute appeared first on .

A Complete Guide to Turning Text Into Audio With Audio-LDM

Featured Imgs 26

In today's rapidly evolving digital landscape, AI models have emerged as powerful tools that enable us to create remarkable things. One such impressive feat is text-to-audio generation, where we can transform written words into captivating audio experiences. This breakthrough technology opens up a world of possibilities, allowing you to turn a sentence like "two starships are fighting in space with laser cannons" into a realistic sound effect instantly.

In this guide, we will explore the capabilities of the cutting-edge AI model known as audio-ldm. Ranked 152 on AIModels.fyi, audio-ldm harnesses latent diffusion models to provide high-quality text-to-audio generation. So, let's embark on this exciting journey!

Using Data Diodes for One-Way Information Transfer and Preventing Data Leaks

Featured Imgs 26

Every organization dealing with information processing eventually faces the challenge of securely storing confidential data and preventing its leakage. The importance of this issue for a company depends on the potential damage a data breach could cause. The greater the risk of loss from a data leak, the more rigorous the protective measures should be. These measures can range from establishing internal policies and installing Data Loss Prevention (DLP) systems to adopting a Zero Trust approach or creating Air Gaps, which involves physically isolating critical network segments from external access.

Isolating secure networks to prevent data exchange with other segments is crucial, particularly for industrial infrastructures and various process control systems like DCS, PLC, SCADA, state-owned companies handling regulated data, and commercial entities involved in innovative projects. However, the concept of an Air Gap is not entirely foolproof. This is mainly because even a fully isolated infrastructure must occasionally interact with the external world. For example, controller firmware needs regular updates, confidential commercial or government data requires refreshing, and outcomes of product designs often have to be presented to the public.

Optimal CX With Hidden Prompts: The Secret Sauce of Prompt Engineering for LLMs

Featured Imgs 23

In the fast-moving field of Generative AI in Artificial Intelligence, particularly with the advent of large language models (LLMs) such as GPT-4, prompt engineering has become a crucial Aspect of delivering the desired customer experience (CX). One of the most effective yet often overlooked techniques in prompt engineering is the use of hidden prompts, also known as system prompts. These hidden prompts play a crucial role in guiding the model's output, ensuring efficiency, consistency, context awareness, and alignment with the intended user experience.

What Are Hidden Prompts?

Hidden prompts are predefined instructions embedded within the interaction setup of an LLM. Unlike user-visible prompts, these instructions are not shown to the end-user but are crucial in shaping how the model governs, interprets, and responds to the user's requested inputs. Hidden prompts help set the stage, establish context, define the constraints with which the LLM functions, and also role play to adapt to domains and use cases.

Change Keyboad Bindings (Shortcuts) In the Virtual Console

Featured Imgs 26

The virtual console, also known as the terminal or command line interface, is a powerful tool in Linux for performing various tasks and executing commands. One Aspect of customization that can greatly enhance your productivity is modifying the keyboard bindings in the virtual console. This article will guide you through the process of changing keyboard bindings to suit your preferences and streamline your workflow. 

Before diving into customizing keyboard bindings, it's important to familiarize yourself with the virtual console. The virtual console provides a text-based interface for interacting with the operating system. It allows you to execute commands, manage files, and perform system configurations without the need for a graphical user interface. 

Another Stab at Truncated Text

Category Image 091

Seems like we’re always talking about clipping text around here. All it takes is a little browsing to spot a bunch of things we’ve already explored.

It’s harder than it looks! And there’s oodles of consideration that go into it! Last time I visited this, I recreated a cool-looking implementation on MDN.

In there, I noted that VoiceOver respects the full text and announces it.

A truncated block of text with VoiceOver text overlay of the full content.

I started wondering: What if I or someone else wanted to read the full text but didn’t have the assistive tech for it? It’s almost a selfish-sounding thing because of long-term muscle memory telling me I’m not the user. But I think that’s a valid request for a more inclusive experience. All folks should be able to get the full content, visually or announced.

I didn’t want to make the same demo, so I opted for something a little different that poses similar challenges, perhaps even more so. This is it:

I know, not the loveliest thing ever. But it’s an interesting case study because:

This setup does what my MDN experiment doesn’t: give users without assistive tech a path to the full content. Right on, ship it! But wait…

Now VoiceOver (I’m sorry that’s all I’ve tested in) announces the button. I don’t want that. I don’t even need that because a screen reader already announces the full text. It’s not like someone who hears the text needs to expand the panel or anything. They should be able to skip it!

But should we really “hide” the button? So much conventional wisdom out there tells us that it’s terrible to hide and disable buttons. Any control that’s there for sighted readers should be present for hearing listeners as well.

If we were to simply drop disabled="true" on the button, that prevents the screen reader from pressing the button to activate something needlessly. But now we’ve created a situation where we’ve disabled something without so much as an explanation why. If I’m hearing that there’s a button on the page and it’s disabled (or dimmed), I want to know why because it sounds like I might be missing out on something even if I’m not. Plus, I don’t want to disable the button by default, especially for those who need it.

This is where “real world” Geoff would likely stop and question the pattern altogether. If something is getting this complicated, then there’s probably a straighter path I’m missing. But we’re all learners here, so I gave that other Geoff a shiny object and how he’s distracted for hours.

Let’s say we really do want to pursue this pattern and make it where the button remains in place but also gives assistive tech-ers some context. I know that the first rule of ARIA is “don’t use ARIA” but we’ve crossed that metaphorical line by deciding to use a <button>. We’re not jamming functionality into a <div> but are using a semantic element. Seems like the “right” place to reach for ARIA.

We could “hide” the button this way:

<!-- NOPE! -->
<button aria-hidden="true">Show Full Text</button>

Buuuut, slapping aria-hidden="true" on a focusable element is not considered a best practice. There’s an aria- approach that’s equivalent to the disabled attribute, only it doesn’t actually disable the button when we’re not using a screen reader.

<button aria-disabled="true">Show Full Text</button>

Cool, now it’s hidden! Ship it. Oh, wait again. Yes, we’ve aria-disabled the button as far as assistive tech is concerned, but it still doesn’t say why.

Button in a focus state with VoiceOver transcription saying 'You are currently on a button. This item is dimmed.'

Still some work to do. I recently learned a bunch about ARIA after watching Sara Soueidan’s “The Other C in CSS” presentation. I’m not saying I “get” it all now, but I wanted to practice and saw this demo as a good learning exercise. I learned a couple different ways we can “describe” the button accessibly:

  • Using aria-label: If our element is interactive (which it is), we can use this to compose a custom description for the button, assuming the button’s accessible name is not enough (which it’s not).
  • Using aria-labelledby: It’s like aria-label but allows us to reference another element on the page that’s used for the button’s description.

Let’s focus on that second one for a moment. That might look something like this:

<button aria-disabled="true" aria-labelledby="notice">Show Full Text</button>
<span id="notice">This button is disabled since assistive tech already announces the article content.</span>

The element we’re referencing has to have an id. And since an ID can only be used once a page we’ve gotta make sure this is the only instance of it, so make it unique — more unique than my lazy example. Once it’s there, though, we want to hide it because sighted folks don’t need the additional context — it’s for certain people. We can use some sort of .visually-hidden utility class to hide the text inclusively so that screen readers still see and announce it:

.visually-hidden:not(:focus):not(:active) {
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0); /* for IE only */
  clip-path: inset(50%);
  position: absolute;
  white-space: nowrap;
}

Let’s make sure we’re referencing that in the CSS:

<button aria-disabled="true" aria-labelledby="notice">Show Full Text</button>
<span id="notice" class="visually-hidden">This button is disabled since assistive tech already announces the article content.</span>

This certainly does the trick! VoiceOver recognizes the button, calls it out, and reads the .visually-hidden notice as the button’s description.

Button in a focus state with VoiceOver transcription saying 'This button is disabled since assistive tech already announces the article content., dimmed, button'

I’m pretty sure I would ship this. That said, the markup feels heavy with hidden span. We had to intentionally create that span purely to describe the button. It’s not like that element was already on the page and we decided to recycle it. We can get away with aria-label instead without the extra baggage:

<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Quidem asperiores reprehenderit, dicta illum culpa facere qui ab dolorem suscipit praesentium nostrum delectus repellendus quas unde error numquam maxime cupiditate quaerat?
<button aria-disabled="true" aria-label="This button is disabled since assistive tech already announces the article content.">Read More</button>

VoiceOver seemed to read things a little smoother this time around. For example, it read the aria-label content right away and announced the button and its state only once. Left to my own devices, I’d call this “baked” and, yes, finally ship it.

But not left to my own devices, this probably isn’t up to snuff. I inspected the button again in DevTools to see how the accessibility API translates it.

DevTools accessibility information on a button element with the aria-label filled it matches the name.

This looks off to me. I know that the button’s accessible name should come from the aria-label if one is available, but I also know two other ARIA attributes are designed specifically for describing elements:

  • aria-description: This is likely what we want! MDN describes it as “a string value that describes or annotates the current element.” Perfect for our purposes. But! MDN notes that this is still in the Editor’s Draft of the ARIA 1.3 specification. It shows up widely supported in Caniuse at the same time. It’s probably safe to use but I’m strangely conservative with features that haven’t been formally recommended and would be hesitant to ship this. I’m sure an actual accessibility practitioner would have a more informed opinion based on testing.
  • aria-describedby: We can leverage another element’s accessible description to describe the button just like we did with aria-labelledby. Cool for sure, but not what we need right here since I wouldn’t want to introduce another element only to hide it for its description.

But don’t just take it from me! I’m feeling my way through this — and only partially as far as testing. This also might be a completely dumb use case — hiding text is usually a bad thing, including little excerpts like this. I’m expecting we’ll get some tips from smarter folks in the comments.

Here’s that final demo once again. It’s editable, so feel free to poke around.


Another Stab at Truncated Text originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter.

7 Easy Ways to Speed Up WordPress Backend

Category Image 061
Speed up WordPress backend.Looking to speed up your frustratingly slow WordPress admin panel? A fast and efficient WordPress backend is just as critical as a visually appealing frontend. Think of it as tuning up a sports car engine.

How To Use an Automatic Sequence Diagram Generator

Featured Imgs 26

You may have heard about or experienced the value of sequence diagrams. In this article, I’ll introduce sequence diagrams and describe what they are good for. I’ll also give you a tour of the features of sequence diagrams and explain how to use each feature to interpret the behavior of your code. Then I’ll show how AppMap makes sequence diagrams even better by (a) generating diagrams from your running code and (b) making diagrams fully interactive.

What Is a Sequence Diagram?

Sequence diagrams are a type of Unified Modeling Language (UML) diagram that shows the interactions between different components or objects in a system over time. They show the flow of messages and the order in which these messages are exchanged. They are great for understanding how code works because they show enough detail to communicate the key elements of code behavior while being compact enough to fit a lot of information onto a single page.