Learn How You Can Best Use the Latest CMS In 2017

Post pobrano z: Learn How You Can Best Use the Latest CMS In 2017

To begin with, it would be wise to understand what is meant by the acronym CMS. Depicted as Content Management System, it simply implies that you can deal with content right from your website. It does not really matter how small or big your business is; the CMS software is not something you would wish to miss out on, especially in the current digital world.

At https://www.magenet.com/best-cms-2017/, we do believe that in order for you to enjoy the services of a great CMS, you do not need to focus only on content upload and management, but use it as a smart way of personalizing your content as well. As far as we are concerned, CMS come into main categories namely:

  • Open source
  • Closed source

What you mustn’t forget is that each of the two categories comes with its own advantages and drawbacks. Attributing to their setting options and competitive prices, the open source systems are the most commonly applied. However, these very systems tend to be the most ineffective and do not support customization.

On the other hand, while they may not flexible when it comes to settings, closed source systems are not only costly but safe and come with a customization feature. One good thing about the CMS systems is that they are available in an array of choices from which you can pick what suits your content marketing needs. The incorporated ready-made themes and plugins allow for easy use of the CMS software by people with little coding know-how. But if you understand coding, it is our bet that you will find the open source CMS along with its setting options very enjoyable.

CMS vs blogging platforms

Certain individuals have no idea about the difference that exists between the blogging platforms and CMS. Well, this is something that has eluded them considering that certain CMS platforms may have started as blogging platforms. However, the most important point to note here is that the CMS software is more urbane and comes with numerous options. With an endless list of plugins that widens your online scope, you can easily relay emails; take control of your content or trademark your site.

Besides, CMS differs from blogging platforms due to their varying hosting domains. Normally, while CMS platforms incorporate web hosting services, any blog on a given platform is hosted by the same platform. In this case, you must be prepared to remit some fee before your site is hosted.

That said and done, you will definitely find CMS platforms very handy when it comes online business.

Suitable CMS for different applications

Presently, the most commonly used CMS platform is Best blog CMS WordPress. While WP popularity may have declined in the recent times, it still plays a critical role in CMS. Looking at our analysis at https://www.magenet.com/best-cms-2017/, approximately 60 % users of CMS depend entirely on WP. Good examples of WordPress users include MTV News, BBC America, and Variety. This is attributed to the fact that WP is an open source and therefore does not require certification before using it.

Quite a good number of developers are consistently enhancing the open source platform through the inclusion of the latest plugins and themes. It is easy to personalize CMS to suit your site’s convenience.

Best e-commerce CMS

Are you an online shop owner? If yes, then you must be sure to choose a particular set of plugins for your business. Although there are numerous CMS systems offering unique e-commerce plugins; however, you can still look for the specific CMS systems designed with your e-commerce needs in mind. A good example is Magento which is mostly used by Cisco Systems, Nike, and 3m. It is basically among the top-rated ecommerce CMS in the business world.

Bottom line: There are actually many types of CMS systems and what you need is pick what suits your business needs. Visit us by clicking on the above link to learn more of these and how you can best utilize the CMS systems.

Creative Marketing 101 – Where the Right and Left Brain Meet

Post pobrano z: Creative Marketing 101 – Where the Right and Left Brain Meet

When it comes to marketing in the digital realm, there needs to be a perfect blend of technology and creativity. In days gone by it was usually the marketer with the most creative sales copy that won the race. In the hi-tech world of today, most marketing is now conducted on the Internet or through SMS messages via mobile phones and technology is a huge part of those techniques. Successful San Francisco SEO digital marketing professionals, for example, should have a place inside their heads where the right and left brain intersect.

Understanding Left Brain Activity

According to the anatomy of the human brain and what we’ve come to know about it, thanks to years of study and huge advances in technology, each hemisphere of the brain takes on differing responsibilities, biological functions if you will. The left brain is the left hemisphere and is responsible for taking what you hear and processing it, as well as handling most of what goes into speech. The left side of the brain is the side that is responsible for logical thinking and mathematical calculations, so that is the side that would handle the technology inherent in creative digital marketing.

Creating in the Right Hemisphere

The right hemisphere, on the other hand, is responsible for special abilities. A musician is said to be right hemisphere dominant because that is the side where creativity resides. A little bit of math can be handled in the right hemisphere, but very basic levels that are far inferior to what is needed for a sound understanding of technology. In terms of language, the right brain interprets what it hears based on tone and, sometimes, even intuition, which is based on memories it extracts from deeper levels.

A Good Marketer Needs the Perfect Right/Left Connection

What you will find when it comes to marketing is that both sides have a role to play and creativity needs to intersect with logic to produce a strategy that is appealing enough to be effective. Those statistics analyzed on the left side are carried over to the right so that a creative strategy can be developed.

It’s amazing how the two work in tandem to accomplish great feats. Even so, everyone has a dominant side and that is why so many marketing firms delegate some members of the team to the technological side of the firm, while those dominated by right-brain activity comprise the creative element of the team.

In life, you will always find times when one or the other side of your brain needs to step into a position of dominance, and so it is in marketing. The two need to work in conjunction, back and forth, until a suitable strategy is planned and developed. The perfect digital marketing strategy will begin with a technical understanding that measures metrics, calculates a statistical projection, and then turns that information over to the right side so that a creative approach can be developed. There probably isn’t another industry on earth that requires so much interoperability between the right and left hemispheres of the human brain. This is why it really pays for a marketing pro to understand this connectivity. It’s simply amazing.

30 Crazy Colorful Logos

Post pobrano z: 30 Crazy Colorful Logos

Sometimes you just need a bit of POP to attract attention to your logo, and nothing pops quite like a splash of color. Added color can actually scientifically increase your logos attention. Check out these 10 quick facts about color from UCREATIVE:

  1. The world’s most popular color is blue./li>
  2. Red is the first color a baby sees.
  3. Anger management issues? Use pink!
  4. Yellow + Red = Hunger
  5. There was once a law prohibiting the use of a color.
  6. Mosquitoes love blue.
  7. Yellow makes you dizzy.
  8. “Bulls hate red” is a total myth.
  9. Colors affect our depth perception.
  10. Avoiding vehicular accidents? Choose white!

[Source:UCREATIVE]

I’ve gone ahead and compiled a collection of crazy colorful logos for your inspiration! Enjoy!

Credit to respective artists.


Credit:Cosmin Cuciureanu

Credit:Chris Bernay

Credit:Marc Clancy

Credit:Juan Tran

Credit:Bratus ™

Credit:Leigh Taylor

Credit:Safa Paksu

Credit:Kudos Design

Credit:Roma Korolev (kaer logo)

Credit:Dimitrije Mikovic

Credit:reloart

Credit:Roma Korolev (kaer logo)

Credit:Maria Grønlund

Credit:LeoLogos.com | Smart Logos Designer

Credit:Gareth Hardy

Credit:Gareth Hardy

Credit:Sean Heisler

Credit:Maria Grønlund

Credit:Alfrey Davilla | vaneltia

Credit:Breno Bitencourt

Credit:LeoLogos.com | Smart Logos Designer

Credit:Maria Grønlund

Credit:Maria Grønlund

Credit:Alfrey Davilla | vaneltia

Credit:Alfrey Davilla | vaneltia

Credit:Sean Farrell

Credit:Alfrey Davilla | vaneltia

Credit:Maria Grønlund

Credit:Alfrey Davilla | vaneltia

Credit:Bratus ™


Mobile Optimization: Reassessing the Responsive vs. Mobile Site Debate

Post pobrano z: Mobile Optimization: Reassessing the Responsive vs. Mobile Site Debate
first image of the post

For the last four or five years, responsive design has been the go-to approach for most webmasters looking to optimize their sites for mobile. There are good reasons for this, which we touch on in this article, but it’s not necessarily the ideal solution in when creating a positive mobile browsing experience. Despite widespread perception that responsive design is now the optimal approach, there are still valid reasons to consider a different way: a dedicated mobile site. In this article we address some of the benefits of mobile sites that you may not have considered, as well as a reassessment of the strengths and weaknesses of responsive design. The purpose is not to dispute the general efficacy of responsive design, but rather to highlight the fact that it isn’t the de facto ‘best’ choice in all applications.

The industry standard

The introduction of responsive design as a way to easily accommodate a range of screen sizes was revolutionary. As the number of people using mobile devices for internet browsing grew so rapidly, the ability to accommodate a variety of formats was a huge bonus for webmasters. Now that mobile browsing has overtaken desktop, it’s no surprise that responsive design is considered by many to be the industry standard. So much so that website building packages, designed to be accessible for a layperson, often include integrated responsive design to bring this advantage to non-experts. The hosting company 1&1 is a prime example of this. For a quick refresher, here are a few core advantages to responsive design:

  • Versatile
    Ready to adapt to any size of screen automatically
  • One website
    Because it doesn’t require a separate website, responsive design sites are easier to maintain and promote
  • One URL
    Eliminates confusion of having a different URL for a mobile site for both users and search engines
  • Prepared for the future
    Responsive design can handle the dimensions of new devices with ease

The Unsung Hero

In the eyes of some, mobile websites (usually denoted with ‘m.’ in the URL) are old hat – why go to the effort of creating two sites when you can stick to one? It’s true that having to develop a separate mobile site with a different URL poses some challenges. For instance, you have to maintain two websites simultaneously, which is not only more time consuming but can also create complications for search engine visibility if not managed correctly. However, it’s not quite as simple as that. Not all websites are alike, and there are compelling reasons to consider a mobile-dedicated site, depending on the nature of your project.

User experience

A major advantage of a mobile-dedicated site is that it’s bespoke. That is, because it’s distinct you’re your main website, you can tailor it specifically for mobile use without affecting the desktop browsing experience. The difficulty with responsive design is that any design changes you make to improve the mobile UX will also affect users browsing on larger screens, sometimes negatively. This is a tricky balancing act, and can result in trying to please both mobile and desktop users, but achieving neither. Mobile sites allow you to separate these concerns.

That said, the significance of this issue largely depends on how complex your website is in terms of content and functionality. For example, relatively simple and streamlined websites without many complex design elements or applications won’t have much of an issue. On the other hand, large online stores would struggle to implement design elements for their entire stock and payment processing in way that satisfies both mobile and desktop UX. Particularly for a business like this, a hassle-free user experience is crucial to optimizing conversion rates. This is where a mobile site comes into its element.

Speed

Responsive sites tend to be slower than dedicated mobile sites, which can also negatively impact user experience. This is because a responsive site still has to load virtually all HTML elements and content, no matter if a desktop or mobile device is being used. So, either you have to significantly reduce the size of your site – and risk diluting the desktop user experience – or accept slower loading times on mobile. On the other hand, mobile sites allow you to streamline mobile performance completely independently of your desktop site. This way, you can ensure both sites load as quickly as possible.

SEO

In the past, search engines weren’t as good at ranking mobile sites effectively, so responsive design was regarded as more SEO-friendly. This is changing, and search engines are now much more able to appropriately recognize them. Having a mobile site also offers you the potential to optimize for mobile-specific search intention. This means you can more precisely target mobile users and direct them to a website that’s created specifically for them. Furthermore, the greater freedom to tailor the mobile user experience can be beneficial for SEO, as UX is a tangible ranking factor.

Summary

Responsive design is an extremely useful method of mobile optimization, no doubt about it. It excels in its role for many websites, but can be complicated to implement for necessarily more bloated and complicated sites. Mobile sites offer more design freedom, allowing you to maximize the user experience of more complex web projects. Mobile optimization is not a case of choosing the ‘best’ method – it’s a matter of selecting the most appropriate method for your individual needs.

Inspired by Japanese prints, art by Mike Dorsey

Post pobrano z: Inspired by Japanese prints, art by Mike Dorsey
first image of the post

Mike Dorsey is a tattoo artist who also creates stunning artworks in the style of Japanese ukiyo-e prints. Despite the large inspiration from Middle-Age Japan, his prints keep their own specificities, because the artist includes lots of elements from modern day Western society. You can see a glimpse of his work below, but you should head to his portfolio to see more.

Solving the Last Item Problem for a Circular Distribution with Partially Overlapping Items

Post pobrano z: Solving the Last Item Problem for a Circular Distribution with Partially Overlapping Items

Let’s say we wanted to have something like this:

Clockwise circular (cyclic) distribution with twelve partially overlapping square items. Every item's top left corner is underneath the previous item's bottom left corner
Clockwise circular (cyclic) distribution with partially overlapping items.

At first, this doesn’t seem too complicated. We start with 12 numbered items:

- 12.times do |i|
  .item #{i}

We give these items dimensions, position them absolutely in the middle of their container, give them a background, a box-shadow (or a border) and tweak the text-related properties a bit so that everything looks nice.

$d: 2em;

.item {
  position: absolute;
  margin: calc(50vh - #{.5*$d}) 0 0 calc(50vw - #{.5*$d});
  width: $d; height: $d;
  box-shadow: inset 0 0 0 4px;
  background: gainsboro;
  font: 900 2em/ #{$d} trebuchet ms, tahoma, verdana, sans-serif;
  text-align: center;
}

So far, so good:

See the Pen by thebabydino (@thebabydino) on CodePen.

Now all that’s left is to distribute them on a circle, right? We get a base angle $ba for our distribution, we rotate each item by its index times this $ba angle and then translate it along its x axis:

$n: 12;
$ba: 360deg/$n;

.item {
  transform: rotate(var(--a, 0deg)) translate(1.5*$d);
	
  @for $i from 1 to $n { &:nth-child(#{$i + 1}) { --a: $i*$ba } }
}

The result seems fine at first:

See the Pen by thebabydino (@thebabydino) on CodePen.

However, on closer inspection, we notice that we have a problem: item 11 is above both item 0 and item 10, while item 0 is below both item 1 and 11:

Highlighting the issue we encounter with our circular distribution using the above code. The last item (11), ends up both over one before it (10) and over the one after (0), while the first item (0) is both under the one before it (11) and under the one after it (1).
Highlighting the issue we encounter with our circular distribution.

There are a number of ways to get around this, but they feel kind of hacky and tedious because they involve either duplicating elements, cutting corners with clip-path, adding pseudo-elements to cover the corners or cut them out via overflow. Some of these are particularly inefficient if we also need to animate the position of the items or if we want the items to be semi transparent.

So, what’s the best solution then?

3D to the rescue! A really neat thing we can do in this case is to rotate these items in 3D such that their top part goes towards the back (behind the plane of the screen) and their bottom part comes forward (in front of the plane of the screen). We do this by chaining a third transform function – a rotateX():

transform: rotate(var(--a, 0deg)) translate(1.5*$d) rotateX(40deg)

At this point, nothing seems to have changed for the better – we still have the same problem as before and, in addition to that, our items appear to have shrunk along their y axes, which isn’t something we wanted.

See the Pen by thebabydino (@thebabydino) on CodePen.

Let’s tackle these issues one by one. First off, we need to make all our items belong to the same 3D rendering context and we do this by setting transform-style: preserve-3d on their parent (which in this case happens to be the body element).

The result after ensuring all our items are within the same 3D rendering context: they are all in the correct order, with every item's top left corner underneath the bottom left corner of the previous item.
The result after ensuring all our items are within the same 3D rendering context (live demo).

Those on current Firefox may have noticed we have a different kind of issue now. Item 8 appears both above the previous one (7) and above the next one (9), while item 7 appears both below the previous one (6) and below the next one (8).

Screenshot illustrating the Firefox issue described above.
Screenshot illustrating the Firefox issue.

This doesn’t happen in Chrome or in Edge and it’s due to a known Firefox bug where 3D transformed elements are not always rendered in the correct 3D order. Fortunately, this is now fixed in Nightly (55).

Now let’s move on to the issue of the shrinking height. If we look at the first item from the side after the last rotation, this is what we see:

Geometric illustration. First item and its projection onto the plane of the screen, side view from the + of the x axis. From this point, we see these as two lines, AB and CD, which intersect in the middle, this intersection being the point O. The angle between them is the angle of rotation of each item around its own x axis, 40° in this case.
First item and its projection onto the plane of the screen, side view.

The AB line, rotated at 40° away from the vertical is the actual height of our item (h). The CD line is the projection of this AB line onto the plane of the screen. This is the size we perceive our item’s height to be after the rotation. We want this to be equal to d, which is also equal to the other dimension of our item (its width).

We draw a rectangle whose left edge is this projection (CD) and whose top right corner is the A point. Since the opposing edges in a rectangle are equal, the right edge AF of this rectangle equals the projection d. Since the opposing edges of a rectangle are also parallel, we also get that the ∠OAF (or ∠BAF, same thing) angle equals the ∠AOC angle (they’re alternate angles).

Geometric illustration. We draw a rectangle whose left edge is the CD projection and whose top right corner is the A point.
Creating the CDFA rectangle.

Now let’s remove everything but the right triangle AFB. In this triangle, the AB hypotenuse has a length of h, the ∠BAF angle is a 40° one and the AF cathetus is d.

Geometric illustration focused on the right triangle AFB
The right triangle AFB

From here, we have that the cosine of the ∠BAF angle is d/h:

cos(40°) = d/h → h = d/cos(40°)

So the first thing that comes to mind is that, if we want the projection of our items to look as tall as it is wide, we need to give it a height of $d/cos(40deg). However, this doesn’t fix the squished text or any squished backgrounds, so it’s a better idea to leave it with its initial height: $d and to chain another transform – a scaleY() using a factor of 1/cos(40deg). Even better, we can store the rotation angle into a variable $ax and then we have:

$d: 2em;
$ax: 40deg;

.item {
  transform: rotate(var(--a, 0deg)) translate(1.5*$d) rotateX($ax) scaleY(1/cos($ax));
}

The above changes give us the desired result (well, in browsers that support CSS variables and don’t have 3D order issues):

The final result after fixing the height issue: all items are square again and they are all in the correct order, with every item's top left corner underneath the bottom left corner of the previous item.
The final result after fixing the height issue (live demo).

This method is really convenient because it doesn’t require us to do anything different for any one item in particular and it works nicely, without any other extra tweaks needed, in the case of semitransparent items. However, the above demo isn’t too exciting, so let’s take a look at a few slightly more interesting use cases.

Note that the following demos only work in WebKit browsers, but this is not something related to the method presented in the article, it’s just a result of the currently poor support of calc() for anything other than length values.

The first is a tic toc loader, which is a pure CSS recreation of a gif from the Geometric Animations tumblr. The animation is pretty fast in this case, so it may be a bit hard hard to notice the effect here. It only works in WebKit browsers as Firefox and Edge don’t support calc() as an animation-delay value and Firefox doesn’t support calc() in rgb() either.

Animated gif showing a tic toc loader. Eighteen bars are distributed on a circle, all pointing towards the origin. Every two opposing bars animate at the same time, rotating by half a turn around their own central points. Once they are done, the next pair of opposing bars starts animating.
Tic toc loader (see the live demo, WebKit only)

The second is a sea shell loader, also a pure CSS recreation of a gif from the same Tumblr and also WebKit only for the same reasons as the previous one.

Animated gif showing a sea shell loader. There are two layers, with eighteen bars distributed on identical circles on each layer. All the bars rotate around their own central points at the same time, with those on the layer behind being 90 degrees away from those on the layer in front at all times.
Sea shell loader (see the live demo, WebKit only)

The third demo is a diagram. It only works in WebKit browsers because Firefox and Edge don’t support calc() values inside rotate() functions and Firefox doesn’t support calc() inside hsl() either:

Diagram showing five discs distributed clockwise on a circle, partly overlapping, with each of the discs partly underneath the disc following it.
Diagram (see the live demo, WebKit only)

The fourth is a circular image gallery, WebKit only for the same reason as the diagram above.

Circular image gallery. Image thumbnails are distributed in a similar fashion to the discs in the previous demo, on a circle around the current image. Clicking on a thumbnail selects that image and moves it in the middle where it grows to its natural size, while the previously selected image shrinks and moves back in place on the circle. All images show pictures of Amur leopards.
Circular image gallery (see the live demo, WebKit only)

The fifth and last is another loading animation, this time inspired by the Disc Buddies .gif by Dave Whyte.

Animated gif. 12 discs are distributed on a circle in a similar fashion to the previous demos. The ones on odd positions shift out on another outer layer. The two layers rotate in opposite directions, then the items on the outer layer shift back on the inner layer and then the animation repeats itself.
Disc Buddies loading animation (see the live demo, WebKit only)

Solving the Last Item Problem for a Circular Distribution with Partially Overlapping Items is a post from CSS-Tricks

User Facing State

Post pobrano z: User Facing State

Let’s talk about state. Communicating state to the user that is, not application stores state in JavaScript objects, or localStorage. We’re going to be talking about how to let our users know about state (think: whether a button is disabled or not, or if a panel is active or not), and how we can use CSS for that. We’re not going to be using inline styles, or, as much as can be helped, class selectors, for reasons that will become clear as we go.

Still here? Cool. Let’s do this.

All dynamic components of an application have a default user-facing state, and that state needs to be stored and updated as users interact with these components.

For example, when a button is pressed, things happen (that’s what buttons are for). When these things happen, they are typically represented in a visual manner in the interface. The button’s background may change to indicate it was pressed. If the button controls other components in the interface, those components likely visually change in style, or in some cases their visibility is toggled. An item gets deleted, a notification pops up, an error style is applied, etc.

You may have noticed that we’ve been mentioning the „visual” state of components quite a bit. That’s exactly the kind of problem I’ve been finding with a lot of tutorials, articles and general talking about state.

More often than not, developers are using „stateful” classes to manage a component’s state. But this is sorely inadequate, as a component is composed of more than just how it looks. There are underlying semantics that need to be managed along with the component’s visual representation. The failure to manage those underlying semantics becomes apparent as soon as you interact with it via keyboard and/or screen reader.

This is an article about appropriately conveying state so that users, beyond sighted, mouse-using users, can interact with our interfaces.

State is more than just how it looks

Outside of using CSS to appropriately hide content from sighted users and assistive technologies, CSS doesn’t have many intentional effects on an element’s semantics or accessible state. What I mean by that is outside of properties like the unsupported 'speak’, before/after pseudo content, and media queries to specifically restyle components based on user preferences, like the Reduced Motion Media Query and other proposed User Queries, CSS alone is not meant to change an element’s semantics, content or appropriately convey the state of an element in a meaningful way.

Why do I bring all this up? Because managing state with CSS classes alone is, mostly, inadequate for conveying state to all users. Being a language for presentational purposes, giving an input a class of .has-error to change the border color to a shade of red, has no semantic value to it. For all CSS cares, „That’s how you wanted to style that input. Cool. I got your back! Just don’t ask me to style upwards in the DOM. I draw the line there, buddy…”

Instead, to manage and convey state, we should be updating attributes on the appropriate elements. And no, I don’t mean data-attributes. Those don’t mean anything either. If we take this approach, in many cases we won’t even need stateful classes, outside of classes that toggle an element’s display.

Did we forget we can style with attribute selectors?

HTML and ARIA have a whole bunch of attributes that should be used to appropriately convey the current state of a component.

Thinking about using an .is-disabled class on your <button></button> or <input type="text" />? That’s only going to visually disable it. You’re still going to have to programmatically turn off click and keyboard events to that element. Instead use the [disabled] attribute and you’ll have yourself a CSS selector to style your element, and the browser will do all the appropriate work to disable that element for you!

So instead of:

input.is-disabled { 
  opacity: .65; 
}

Which only visually modifies an input, use:

input[disabled] { 
  opacity: .65; 
}

This achieves the same visual effect as using the .is-disabled class, but instead we’re utilizing the attribute selector from the attribute we need to set to convey the current state to the browser and users. All while not having to do any of the aforementioned extra work, with JavaScript, to disable the input, if we were simply toggling a class.

Example: Being „Active”

To provide some deeper context, let’s look at a situation where you might use an .is-active class. For different components, being „active” can mean completely different things, which is why I can appreciate wanting to use a single, reusable class name, instead of determining which attribute needs to be managed to appropriately convey state. But making state management easier for developers doesn’t necessarily help users, so let’s do this the right way.

Active Navigation Links

First let’s look at declaring the currently active link in a navigation. The following Pen has two examples. The first using an .is-active class to indicate the current navigation item. The second uses aria-current="page".

See the Pen .is-active vs aria-current=’page’ by Scott (@scottohara) on CodePen.

While they both look exactly the same, if you use either Jaws 18, Voice Over, or NVDA 2017.2 (when it’s released) when navigating the example, you’ll hear something like: „Features, current page.” when interacting with the example using aria-current. Check out Léonie Watson’s article on [aria-current] for many other examples of where one could use this attribute for styling, in place of an .is-active class.

Active Buttons

Depending on the purpose of the button, the active state of the button may need to be augmented for screen reader users via one of the following ARIA attributes:

  • aria-expanded – indicates that the button controls another component in the interface, and relays that component’s current state.
  • aria-pressed – indicates that the button behaves similarly to a checkbox, in that it has its state toggles between being pressed or unpressed.

Without using one of the above attributes, a button has no inherent way of communicating whether it had been interacted with or not. That is totally fine if a situation doesn’t require it, but if you do need to communicate a button has been activated, then here’s how we can do that using aria-pressed:

See the Pen Toggle Button Example by Scott (@scottohara) on CodePen.

In the above example, we have a button that can be interacted with to add an item to a shopping cart. To indicate when an item has been added, instead of using a class, we’re instead toggling the boolean value of the aria-pressed attribute, and using the [aria-pressed="true"] as our styling hook to visually convey the active state. When interacting with the button via a screen reader, it will be announced as „checked” or „unchecked”, add to cart, toggle button.

For a deep dive into the considerations, one should take when developing accessible toggle buttons, one need look no further than Heydon Pickering’s Toggle Buttons article. Heydon outlines, in great detail, why it’s not a good idea to change the visible label of the button, and even brings to light that you may not actually want a toggle button, but instead should consider using a switch.

Managing Accordion State

For our final example, let’s take a look at how we’d manage state in an accordion component:

See the Pen ARIA Accordion Example by Scott (@scottohara) on CodePen.

If you read through the comments in the CSS and JavaScript, you’ll note that this demo is doing a few things.

First, the markup pattern of the accordion is built in a way so that if JavaScript ever becomes disabled for any reason, none of the content will be inaccessible to those users, as the panels are only hidden if the .js class is present.

Second, to circumvent the need for actual <button></button> elements within each accordion panel heading, we’re instead converting their nested s into „buttons”, by applying the ARIA role="button", and then adding in all the expected keyboard functionality via the keydown event listener. Additionally, to ensure the „button” can be accessed by keyboard users, a tabindex="0" has been set to each of the ARIA buttons.

Finally, here we use the aria-expanded attribute to communicate the current state of the accordion panel, so when a user focuses on the accordion trigger with a screen reader, it will announce „Accordion Heading, collapsed (or expanded) button”.

You will notice that the accordion panels are utilizing an .is-active class to toggle their visible state. Egads! But wait, this is the one thing we can count on CSS alone to help us with. If we take a closer look at the selectors at work here:

.js .accordion__panel {
  border-bottom: 1px solid;
  overflow: hidden;
  padding: 0 1em;
  max-height: 0px;
  transition:
    max-height .2s ease-in-out,
    visibility .2s ease-in-out;
  visibility: hidden;
}

.js .accordion__panel.is-active { 
  max-height: 100vh;
  visibility: visible;
}

The first selector, the one contingent on JavaScript being available, utilizes visibility: hidden to inclusively hide the panel’s contents from both sighted users and users of assistive technologies. The overflow, max-height, and transition properties are then set to collapse the panel, and prepare it to grow into it’s expanded form, once the .is-active class is added to the accordion panel. I could have toggled display: none or programmatically added and removed the hidden attribute from the panels, instead, but we would have lost out on the ability to transition the panel open. And everyone likes a good transition, right?

In Closing

The main thing I want you to take away from all of this is that if you are only toggling classes to visually manage state of your components, you are likely not appropriately conveying that state to users of assistive technologies.

You need to be using the appropriate elements (<button></button>s are your friend!), and managing the appropriate attributes and their values to make truly accessible user experiences. Sure, you could to do those things and continue to toggle stateful classes to control your styling. But if we have to update attributes and their values, and those are also valid CSS selectors, then why would we do more work than needed by toggling classes too?

 

 


User Facing State is a post from CSS-Tricks

Forbes: Marcia Zuckerberg, Carla Slim, Billie Gates

Post pobrano z: Forbes: Marcia Zuckerberg, Carla Slim, Billie Gates
Print
Forbes

Advertising Agency:Ogilvy & Mather, Sao Paulo, Brazil
Presidente Ogilvy Brasil:Fernando Musa
VP Nacional de Criação:Claudio Lima
Diretor de Criação Executivo:Félix Del Valle
Diretor de Criação:Eduardo Doss
Diretor de Arte:João Alexandre
Redatores:Guilherme Moreira, Phylippe Moura, Marcos Botelho
Atendimento:Juliana Fernandes
Executivo:Antonio Camarotti
Cliente:Antonio Camarotti
Midia:Renata Valio, Betania Aragão
Artbuyer:Francini Santiago
Produtora:Notan
Retoque:Notan

Agregator najlepszych postów o designie, webdesignie, cssie i Internecie