Adding Custom HTML Attributes With the Block Attributes Plugin

Earlier this week, websevendev released its fourth WordPress plugin to the official directory named Block Attributes. The extension allows end-users to add any HTML attribute to nearly any block.

One of the problems with the WordPress editor is that it can be a bit fussy about customizing HTML. Blocks are built on a set of standards, and the markup is supposed to meet those expectations. If something does not fit, users see an invalid markup warning.

However, there are times when users need to drop in a custom HTML attribute for various reasons. For example, I sometimes need to add a custom data- attribute for working with a bit of JavaScript. Since I know my way around code well enough, I typically write out the HTML in those situations via the Custom HTML block. But, that does not make sense when minor attribute additions are called for.

WordPress currently allows users to add classes and IDs (called an “HTML anchor” in the admin) to almost every block. It does not allow for direct input of the dozens of other possible attributes that HTML supports. The use cases for the average user are few and far between.

For those scenarios where some users could use the extra feature, the Block Attributes plugin is handy.

The plugin is straightforward to use. It adds a new field named “Additional attributes” under the Advanced tab of every block. Users can add the attribute name and click the “Add” button. From there, it creates a new field for adding the attribute value.

Adding a custom attribute for JavaScript handling to a Button block in the WordPress editor via the Block Attributes plugin panel.
Adding an onclick attribute to a Button block.

The plugin also supports multiple attributes. Once you add one, you simply use the same input field to create more.

For my first test drive, I added a simple onclick attribute with a value of myFunction(). Then, I hopped over to my theme and created that function via JavaScript to output a simple message in the console. Everything looked good under the hood, and it worked.

Most of the use cases I have in mind are for integrating with JavaScript, and this was a simple example of what is possible. There are far more complex things a developer could do with such a feature. That is reason enough to keep this plugin in the toolbox — sometimes you need a wrench instead of a hammer.

I could also see Block Attributes being used for adding ARIA attributes in other situations where it might aid accessibility.

Users could add custom styles to a specific block via a style attribute with the plugin. However, unless this is a simple one-off, I would recommend against it. For more advanced use cases, Blocks CSS is a far more suitable plugin. It has a built-in syntax highlighter. Plus, a textarea is friendlier than a one-line text input box.

The only downside to Block Attributes I have seen is upon deactivation. You will see the dreaded “this block contains unexpected or invalid content” message in the editor if you have added any custom attributes. The editor has managed to resolve any issues I have run into with the core blocks.

Side-by-side view of the block resolution popup modal in the WordPress editor.
Resolving block warning after deactivating plugin.

Deactivating the plugin should not affect the front-end output. Because the custom attributes are a part of the HTML markup, they will still be there. The error message should only show in the editor.

Designing for the Unexpected

When I think about what front-end development really is and feels like, this is at the heart of it: designing around a huge set of unknowns, and really embracing that notion as a strength of the web rather than a weakness or unfortunate truth we have to work around.

Cathy Dutton digs into this with real code and examples over on A List Apart. A recurring theme is the idea that content (certainly an unknown, since content changes) can and should drive design decisions. It is even floated that container queries might not be all they are cracked up to be since they are still based on a parent, not content.

It’s hard to say for sure whether container queries will be a success story until we have solid cross-browser support for them. Responsive component libraries would definitely evolve how we design and would improve the possibilities for reuse and design at scale. But maybe we will always need to adjust these components to suit our content.

We can’t design the same way we have for this ever-changing landscape, but we can design for content. By putting content first and allowing that content to adapt to whatever space surrounds it, we can create more robust, flexible designs that increase the longevity of our products. 

Direct Link to ArticlePermalink


The post Designing for the Unexpected appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

Google’s New Ad Tracking Tech FLoC and WordPress

Google’s New Ad Tracking Tech FLoC and WordPressGoogle announced that it would no longer support third-party cookies and has now come out with its own alternative ad tracking technology: FloC. In the wake of third-party cookies, a type of tracker that reports consumer activity across websites to create personalized ads and improve user experiences, there is significant interest in creating alternative tracking […]

The post Google’s New Ad Tracking Tech FLoC and WordPress appeared first on WPExplorer.

Some Articles About Accessibility I’ve Saved Recently III

  • The perfect link — Rian Rietveld defines them: “When you click on them, they take you somewhere else.” Not much code in here (we’ve got that), just a lot of practical accessibility advice. For example, the alt text for a linked image can allude to the fact that it is a link. Just an image: “A cherry tree in full bloom.” Link: “Wikipedia on cherry blossoms.”
  • Google Announces Seismic Change to Docs — George Joeckel covers the unfolding news that Google Docs is going to be rendered in <canvas>, which feels like a massive WTF moment when it comes to accessibility. At one point, the vibe was that there would be a separate product for people with screen reader needs. Separate but equal isn’t a good situation. Looks like the <canvas> based rendering stuff is on hold for now, so community feedback FTW?
  • Don’t use custom CSS mouse cursors — Eric Bailey: I believe that letting CSS load a custom cursor was a mistake.
  • Web Designers Grapple With Downside to Flashy Animation: Motion Sickness — Katie Deighton covers the idea that things like preference toggles and prefers-reduced-motion exists (although not by name). Always interesting to see a topic like this makes its way to a major publication like The Wall Street Journal.
  • prefers-reduced-motion and browser defaults — Speaking of prefers-reduced-motion, Bruce Lawson on the paragraph-of-the-year: Yes, it was a meeting request from Marketing to discuss a new product page with animations that are triggered on scroll. Much as a priest grasps his crucifix when facing a vampire, I immediately reached for Intersection Observer to avoid the browser grinding to a halt when watching to see if something is scrolled into view. And, like an exoricst sprinkling holy water on a demon, I also cleansed the code with a prefers-reduced-motion media query.
  • Using CSS to Enforce Accessibility — Adrian Roselli covers this great tactic where you don’t get the proper CSS styling unless you’ve also implemented the appropriate accessibility attributes (e.g. [role="region"][aria-labelledby][tabindex] for a scrolling table). This is a powerful idea and happens to showcase the power of CSS nicely in a way that styling solutions that avoid using selectors don’t benefit from.
  • Accessibility testing with Storybook — Varun Vachhar covers how you can run Axe over your component library even as you code. Accessibility issues, like color contrast problems, are bugs. Might as well give yourself the same tooling opportunities to fix them at the same time you’d fix any other bug.
  • Making A Strong Case For Accessibility — Todd Libby covers how you can fight for accessibility at work. Attempt 1.) Ethical. Attempt 2.) Financial. Attempt 3.) Legal. 4.) Humanization. Attempt 5.) Don’t ask, just do it.
  • Your Image Is Probably Not Decorative — Eric Bailey covers that most images with an empty alt attribute (literally alt="", no space) probably should have had one, and that when and alt description isn’t available, there are other options (e.g. make it available as an inline image (spacer.gif) even if it isn’t one otherwise, <title> in SVG, etc.).
  • Writing great alt text: Emotion matters — Annnnd speaking of alt, Jake Archibald learns from a 2011 Léonie Watson article: The relevant parts of an image aren’t limited to the cold hard facts.


The post Some Articles About Accessibility I’ve Saved Recently III appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

A More Tab-Like Look

We’ve got lots of plans for the Pen Editor on CodePen. Of course we do! This is the heart and soul of CodePen. The thing where all the great stuff on CodePen is actually produced. Down the road, there will be more big-bangs where the editor evolves to do bigger and better things (but don’t worry, it’ll keep it’s signature simplicity). But the temper the biggness of those bangs, we’re releasing parts of it along the way that shift some of the look and functionality of the editor.

There has been other small stuff, like the Save Pen Dropdown, and you might have noticed some aesthetic changes to the Export and Share menus:

But this update to the look of the editors themselves is probably the most noticeable change yet. No functionality changes here, just aesthetic again.

The post A More Tab-Like Look appeared first on CodePen Blog.

Collective #676




Collective 676 item image

canistilluse.com

Jim Nielsen hopes that browser makers can find a way forward in improving the deficiencies of APIs like alert without setting further precedent that breaking the web is the price of progress.

Read it


Collective 676 item image

Imba

Imba is a programming language for building web applications with insane performance. You can use it both for the server and client. Read the backstory in HN.

Check it out



Collective 676 item image

Pop

Seamless remote pair programming with multiplayer control, crystal-clear voice and high-quality video.

Check it out



Collective 676 item image

Psst

Fast Spotify client with native GUI, without Electron, built in Rust. Very early in development.

Check it out



Collective 676 item image

Alda 101

Alda is a text-based programming language for music composition. It allows you to write and play back music using only a text editor and the command line.

Check it out



Collective 676 item image

Vytal

Vytal shows you what traces your browser leaves behind while surfing the web. This scan allows you to understand how easy it is to identify and track your browser even while using private mode.

Check it out




Collective 676 item image

GitNFT

Autograph and sell your GitHub commits as NFTs. Build your collection and support the contributors you love.

Check it out









Collective 676 item image

On the <dl>

Ben Myers explains why the description list element is underrated and how you can use it.

Read it


The post Collective #676 appeared first on Codrops.

PolkitError – Textual Authentication Agent

How to fix the following error? NewBie

Error creating textual authentication agent: Error opening current controlling terminal for the process (`/dev/tty'): No such device or address (polkit-error-quark, 0)
httpd,reload=yes,status=0

How Much Does it Cost to Start a Membership Site? (2021 Edition)

Are you trying to figure out how much does it cost to start a membership site?

There are many different factors that will affect the cost of your membership website. You’ll need to break them down into all the different essentials to keep your budget under control.

In this article, we’ll show you how much does it cost to start a membership site.

Calculating the cost of building a membership website

How to Calculate the Cost of a Membership Website?

To calculate the cost of a membership website, you’ll need to break down your spending into components.

This includes choosing the right platform, subscription addon, payment processor, and other tools / services that you’ll need. All of them depend on your business requirements, budget, and growth strategy.

To keep this article focused, we will break down our membership site cost analysis into the following major expenses:

There are several great membership platforms that you can use to build a membership website. Three major players in the industry are MemberPress (WordPress), Shopify, and Teachable.

Shopify and Teachable are SaaS (Software as a Service) platforms. They offer an easier setup initially, but they have limited flexibility and higher costs. More importantly, they charge you based on transactions which will take away a big chunk of your revenue over time.

This is why we recommend using MemberPress, which is the best membership site plugin on the market. They allow you sell unlimited memberships with no extra transaction fees.

MemberPress

It runs on top of WordPress, which is already the best website builder in the world used by over 42% of all websites on the internet.

Plus, you get full control over your membership site with the flexibility to choose your own payment service, integrations, and add any feature that you want.

This lets you control the cost of your membership website and adjust it as your business grows. In the long run, you would be able to make a sustainable business while saving a ton of money.

MemberPress has built-in features to sell online courses, digital subscriptions, and even physical memberships like associations.

Business owners using MemberPress are projected to earn over $600 million in 2021.

Membership Website Hosting and Setup Costs

Just like any other type of website, you’ll need a domain name and web hosting account to start a membership website.

Typically, a domain name costs around $16.99 per year and web hosting plans start at $7.99 per month (paid annually).

This is not cheap, considering that you’ll need to spend money on other components as well.

Luckily, the team at Bluehost have agreed to offer WPBeginner readers a generous 60% discount on hosting with a free domain name + SSL certificate which you’ll need in order to accept payments. Basically, you can get started for as low as $2.75 per month.

→ Click Here to Claim This Exclusive Bluehost Offer ←

Bluehost is one of the best web hosting companies in the world and an officially recommended WordPress hosting service.

Alternative options: If you are looking for an alternative, then SiteGround is another excellent option. For more options, see our expert pick of the best WordPress hosting companies.

Next, you’ll need to get a MemberPress license which starts at $179 / year for a single site license.

This gives you all the features you need such as unlimited members, no transaction fees, ability to accept payments online, subscription management, email automation, easy course builder, marketing integrations, and more.

MemberPress pricing

After you download MemberPress, you can go ahead and follow our step-by-step instructions on how to make a membership website in WordPress.

Estimated costs of hosting and setup:

Domain and web hosting: Starting from $2.75 per month – $25 per month
MemberPress: $179 – $479 (depending on your licensing plan)

Payment Processing Costs for Membership Website

The recurring revenue model is what makes membership websites a lucrative online business idea.

MemberPress supports both Stripe and PayPal payment gateways that you can use to accept credit cards. You can also use Authorize.Net as a payment method with their Pro plan.

While MemberPress doesn’t charge any additional transactional fee, these payment service providers (merchant banks) do have a payment processing fee, and this is controlled by Visa, MasterCard, Amex, and other credit card companies.

You will have to pay these fees no matter which membership platform you use.

For example, PayPal may charge 2.90% of the transaction amount and a fixed rate of $0.30 USD for domestic transactions. It may also charge an additional 1.50% for international transactions.

PayPal payment processing fees

Similarly, Stripe would charge $2.9%, a $0.30 USD fixed rate fee, and an additional 1% for international transactions.

The benefit of MemberPress is that you don’t pay them any transaction fees for using the platform. Also your payment processing costs only gets lower as your business grows because Stripe offers lower rates for higher processing volumes.

Whereas other providers like Teachable charge you an additional 5% transaction fee for using their platform on top of the fee you pay for payment processing services.

Estimated costs of payment processing:

PayPal: 2.90% + 0.30 fixed rate. Additional 1.50% on international transactions.
Stripe: 2.90% + 0.30 fixed rate. Additional 1% on international transactions.

Design Costs for a Membership Website

Design and templates for membership websites

Next, you need to choose a design for your membership website. Luckily, there are hundreds of free and paid website templates that work beautifully with MemberPress.

However, you’ll want to stand out from the crowd with a stunning design that looks professional and well polished.

Not only will it create a good impression of your brand, but it’ll also help your customers easily navigate your website. This results in higher engagement and sales.

There are three design options you can choose from based on your budget. We’ll discuss them in low to high pricing order:

  • Free WordPress themes
  • Premium WordPress themes
  • Custom WordPress themes

Free WordPress themes:

Free WordPress themes come with the obvious benefit of saving money, but they often include limited support and customization options compared to paid or premium WordPress themes.

Premium WordPress themes:

Premium or paid WordPress themes come with a price tag, but include more customization options and priority support from developers.

Pricing for premium WordPress themes usually starts at $30 USD per year. Here are some of the most popular membership website themes:

  • Divi – One of the most versatile WordPress themes suitable to make any kind of website including membership sites.
  • Astra – Astra is a popular multipurpose WordPress theme that works beautifully with membership sites. It comes with dozens of starter website templates and a 1-click setup.
  • Ocean WP – Another flexible WordPress theme that comes with powerful customization options.

For more design inspiration, see our pick of the best WordPress membership website themes.

A custom WordPress theme:

A custom WordPress theme is when you hire a WordPress designer/developer to code a unique membership website theme for your website.

This allows you to add custom features to your website and have a unique design that stands out from other membership sites.

However, custom WordPress themes can be very expensive. The cost would depend on the features you want to add and the expertise of the developer.

A custom theme could cost between $1500 to $6000 for a medium-sized business. An enterprise-level design may cost even more than that.

Estimated costs of membership website design:

Free to $30 for a WordPress theme.

$1500 – $6000 for a custom design.

Essential Addons and Extensions Costs

WordPress plugins

MemberPress runs on top of WordPress, which means you can add more features to your website by using plugins.

A WordPress plugin is a piece of software that adds new functions to your website. For instance, there are contact form plugins, landing page builders, social media plugins, and more.

There are also plugins made specifically for MemberPress as well.

The majority of WordPress plugins are available for free. Even many paid plugins also have a lite or free version that you can use.

You can try to keep your membership website costs down by using free plugins whenever possible.

Here is quick list of essential WordPress plugins that you may need right away. All of them are available for free.

Must-Have Features

WPForms – Allows you to easily add a contact form to your membership website.

MonsterInsights – Connect your membership site to Google Analytics and see how users find and use your website. This helps you learn how to bring more users and make more sales.

WP Mail SMTP – Emails are crucial for running a membership website. WP Mail SMTP fixes WordPress email deliverability by issue by properly sending emails using an SMTP server.

Marketing and SEO

All in One SEO – Easily optimize your membership website SEO to get more free traffic from search engines.

PushEngage – Easily send push notifications to your users on mobile as well as desktop. It helps increase website traffic, improve conversions, and grow your business.

OptinMonster – helps you improve conversion rates by converting website visitors into subscribers and paying customers.

Bonus Tools

SeedProd – An intuitive drag and drop page builder that allows you to quickly create custom landing pages and design layouts.

Uncanny Automator – Create automated workflows to manage your membership website. This helps you save time and create better user experience for your customers.

RafflePress – Easily run giveaways and contests for your members to boost engagement and grow your traffic.

Need even more features? Here are some of the must have WordPress plugins that you may want to check out. Many of them are free or have a free version.

Estimated costs of addons and extensions:

Free to Unlimited.

We recommend starting out with free versions of plugins whenever possible. This keeps your costs down and you can choose to buy premium plugins later as your business grows.

Premium Tools and Addons for a Growth Membership Site

We recommend all users to start with shared hosting and use free plugins and theme to keep the costs down. This saves you money and allows you to focus on growing your business.

Once your business starts growing, then you can choose to invest some money on extra features and premium tools. Following are a few additional features that you can later add to your website when you can justify the cost.

Email Marketing – We recommend using Constant Contact which is the best email marketing service for small businesses. For advanced marketing automation, you can use either Drip, ConvertKit, or HubSpot.

Live Chat SupportLive chat software helps you convert more users into paying members. We recommend using LiveChat which is the best customer service platform on the market. (Cost: Starting from $16 per agent per month)

Business Phone Service – A business phone number allows you to easily manage business calls using one number. We recommend using Nextiva, which is the best phone company for small businesses. (Cost: $18.95 per month)

Note: All of these additional services are not necessary to build a membership website. You can choose to add them to your site as your business grows.

Total Cost of Building a Membership Website

Now that we have covered the main areas of spending, let’s take a look at the total cost to build a membership website.

Keep in mind that your costs would increase as your business grows or you are able to invest more into it. We have broken down the cost range into three categories.

  • Starter Membership Website (Recommended): $212 per year or $17.66 per month (Shared hosting $2.75 / month, MemberPress $179 / year, free plugins and theme).
  • Growth Membership Website: $300 – $1000 (WordPress hosting upgrade $4.99/mo, MemberPress Pro $299/yr, paid plugins and marketing services).

For enterprise level membership websites the costs could go higher. They can choose dedicated hosting server, custom design, and hire developers to write custom WordPress plugins.

The best part about using MemberPress to build your membership website is that you are in charge of controlling the cost.

This means you don’t pay for anything that you don’t need right away, and you can still build a powerful membership website.

Tips on Keeping The Costs Down on Your Membership Site

Keeping costs down

Building a membership website with WordPress and MemberPress allows you to choose how you spend money on your membership website.

We recommend all users to start small and scale their website as their business grows.

Now many users compare their website with already established websites in their industry. This isn’t a fair comparison as those businesses have been around longer and already have a revenue stream to justify spending more money.

As a starter membership community you don’t need flashy premium features right off the gate.

You can start with a shared hosting plan on Bluehost which gives you a free domain + SSL. Then, you can purchase MemberPress Basic license plan and start building your membership website.

For essential features, you can rely on free WordPress plugins and theme. You would be surprised with what you can do using only the free plugins.

As your business takes off, you can start investing on premium features. Even then, you can find excellent WordPress deals and coupons to get discounts on all the top tools and services.

We hope this article helped you learn how much does it cost to build a membership website. You may also want to see our complete guide on how to create an email newsletter, or our comparison of the best webinar software platforms.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How Much Does it Cost to Start a Membership Site? (2021 Edition) appeared first on WPBeginner.

Pushing Back Against Privacy Infringement On The Web

At the ripe old age of 25, nytimes.com is now older than some of the people who work building it. Wikipedia turned 20 this year, and the first browser shipped 30 years ago. The Web has over 4 billion internet users and is nearing 2 billion websites. By this point, it’s reasonable to expect to have answers to most of the big, basic questions of how people and digital technology work with one another.

As you no doubt know, however, we don’t. We really don’t. If anything, questions of technology and society seem to be piling up faster than we can address them. I started working for The Times four years ago. Before that, I had done a range of tech work: developing sites at small web shops, product work with startups, consulting for household name tech companies, and heavy involvement in a range of W3C work. One of the things that drew me to The New York Times was the opportunity to work on some of those big unanswered questions in collaboration with excellent teams and with a strong ethical mandate.

Of these issues, perhaps the most surprising to find still unsolved is privacy. Outside of the digital realm, we make multiple privacy decisions a day and typically find them obvious enough that we barely notice they’re there. Is it okay to read that stranger’s DMs over their shoulder? Can I recount that intimate detail that a friend shared with me? Will my doctor repeat what I tell them of my symptoms to my boss?

Weighing up whether we — or someone we speak with — may take personal information from one context and share it in another is something we do almost instinctively. If we required expert opinion for every such decision, ethicist would be a high-income profession. So why can’t we seem to put this one to rest online as well?

The Digital Context

Several factors stand against us. The first is that privacy is contextual. We understand what may be shared to whom and how by using different frames for work, home, the subway, a doctor’s office, or the local neighborhood dive. But in our digital lives, everything is a slight variation on a glossy slab of plastic. We chat with friends on the same gadget we work on, speak in public through, and look up symptoms with. It is hard to develop cues for what counts as appropriate amidst such homogeneity.

A second factor is the usefulness of third parties. The modern development of complex digital products often requires relying on third parties one way or another. This is not necessarily bad. A company specializing in a clear service might have better data protection than a home-grown equivalent, and not all third parties are privacy-invasive. Some third parties work only for the first-party site and will not reuse user data elsewhere. For privacy purposes, they are indistinguishable from whatever the first party does. One example of this might be Fathom: it’s third-party analytics, but they have openly published the method they use to ensure user privacy.

Conversely, other third parties insist on being controllers of the data they take from the users of your site and reuse it independently for entirely different purposes. The latter are clear violations of privacy, but Web technology gives no way for browsers — and therefore users — to tell them apart. Cracking open your ad blocker extension and counting the "trackers" might be easy but it tells you little about how privacy-invasive a site really is. It is hard to automate protection at the browser level without the ability to tell third parties apart.

A final factor we shan’t be coy about is that there’s money to be made from this confusion. Many of the biggest names in tech (and a host of smaller ones too) operate with business models that do nothing other than convert privacy violations into money. They often muddy the waters with widely-read positions that extoll a confounding picture of privacy often confused with security, transparency, complex privacy settings and check-ups, or with consent. It can be hard to progress on informed improvements to privacy when so much of the conversation on the topic comes from a place of confusion.

This might feel like a lot to fix at once, but not to worry: we can all make the Web better one website at a time. It’s easy to become paralyzed thinking that all data collection is a privacy issue. That’s not the case. You can walk this path gradually. The way I approach privacy for a given site is to first try to find a familiar everyday context that I believe is close to it. Reasoning from known everyday contexts makes it possible to tap into established norms for which we tend to have good intuitions. Because the digital world works differently, there is rarely a perfect one-to-one match, but starting with a concrete situation can help structure your thinking.

Enter My Bookshop

Let us look at a bookshop and at how we can incrementally change its privacy properties by adding more details that render it increasingly like a modern commercial website. Hopefully, there is a point at which you will want to draw a line — and that point should tell you something about what is appropriate in a comparable context on the Web.

A bookshop makes for a decent real-world comparison point for an online publication. You go there looking for things to read. The people who work there can see you enter, and they might even recognize you from previous visits. If you’ve identified yourself, they may know your name, or at least have some moniker for you.

As you browse the shop, the staff can get a sense of what you’re looking at. They might not spy on it in great detail, but they’ll know which section you’re in and could easily notice which book you just pulled out. They can use that and ask you questions to offer recommendations.

It’s a commercial environment, and if you buy something there, depending on how you pay they might learn a little bit more about you, and share some of that data with a payment processing company of some sort.

At closer inspection, you notice that the shop has a few video surveillance cameras running. This makes you a little uncomfortable, but after a quick chat with the owner they reassure you that these are running on a local closed circuit such that the video never leaves the shop, is automatically kept for a maximum of 24 hours, and is only ever watched for the sole purpose of identifying theft. These properties — highly restricted access, short retention, clear and limited purpose — offer strong guarantees (assuming you trust the business) and limit how invasive the process is.

But, paying more attention, you notice a number of other smaller, more discrete cameras. They are dispersed throughout the store in a way that allows them to analyze which books you are looking at, which you pull out to read the blurb on, which you decide to buy.

The conversation with the bookshop owner is a bit more fraught this time. Those video feeds go to a number of companies in exchange for which they help pay a little of the shop’s costs or list the shop on neighborhood maps. You agreed to this by pushing the door open and stepping inside.

The owner is adamant that it’s safe, that the process is entirely “anonymous,” that these monitoring companies “only” use a hash of your facial biometrics to recognize you from shop to shop. What do you have to hide anyway? It’s an important part of making sure that the books stay cheap. Without that, only rich people would have books. Anything else would be bad for small businesses and poor people.

Flipping through the list of companies taking video feeds from this shop, you can’t find a name you recognize. Except for those two that seem to be taking video feeds from every single other shop as well.

Pushing the bookshop owner a little more, you come to realize they’re not very happy with those companies. They use the data they collect in the shop both to compete with the bookshop by selling books directly and to recommend other bookshops. They’re also using their position, informed by that data, to push for a model in which they run the infrastructure for all stores — why would a bookshop owner care about walls, shelves, lighting, is their value not just in the book selection? — and an increasing number of other shops have switched over to this worldwide strip mall model. The owner isn’t too sanguine about any of that. "But when you don’t comply they drop you off the map and send people to your competitors," they say.

As promised, finding an exact non-digital equivalent to the state of privacy on the Web is imperfect and has some slightly contrived corners. Yet the above is very close to what it’s like to operate a commercial publisher or an online store on the Web today.

In reading the above, different people will draw the line at different places. Some are entirely bought into the death of privacy and look forward to the promised bright future of big tech bureaucracy. At the other end of the spectrum, others will prefer a staff-less bookshop where they can pick their next read with nary a human ever seeing what it may be.

If you’re like me, you’ll draw the line somewhere around the addition of the CCTV system. I’m not excited about it, but if its data processing is properly limited and if it helps my favorite source of books to stay alive, I can live with it. I am not inclined, however, to accept the pervasive surveillance of my behavior — the primary effect of which is for a handful of large corporations to either absorb small shops or drive them out of existence.

None of these positions is inherently right or wrong, but we help our users if we agree on a default and set expectations to match it. I believe that a good starting point for a default that works for most sites that perform a relatively small set of related services is the Vegas Rule: what happens on the site stays on the site. (Including the parties that work for the site, and only for the site.)

How Can We Build For Privacy?

What does this mean for those of us who build places on the Web that others visit? There is no one-size-fits-all answer to that. Last year, I wrote about how The Times sees it, but how you approach your own situation will depend on the specifics that you are dealing with.

I recommend working on privacy iteratively, with a plan to improve in gradual steps over time. In most cases, it’s unlikely that you’ll be able to deploy a catch-all Big Bang cleanup.

The first step towards making a site more trustworthy in its privacy is to understand what is going on and why. If you work on the tech or product side, you might have grown used to grumbling in dismay as the marketing team adds yet another tracker, which they refer to under harmless, cutesy euphemisms like “pixel,” that will slow down your site. But you might only have a limited understanding of why they do that in the first place.

These overlaps are great opportunities to build actual relationships with other teams. They are trying to achieve something, and that something is probably covering at least some of your pay-check. But they also sometimes struggle to tell honest vendors from hoaxes and they can benefit from a greater understanding of the technology that underlies what they buy — which you can likely help with. If you’re on their side instead of complaining about them, you might not be able to remove all the trackers, but you’ll be in a position to make progress.

Once you have that relationship (or if you’re the person making those decisions), the next step is to make sure that each third party is held accountable. The reality of online business today is such that you might have to keep some trackers, but those that stay should be provably effective. By working closely with our marketing team, we were able to reduce the amount of data The Times shared with third-party data controllers by over 90 percent. Not only did that improve privacy, but it also improved performance. The second step is to develop a habit of healthy skepticism.

Read the fine print so that your users don’t have to — it’s part and parcel of building a site that won’t betray your users’ trust.

That free widget to make it easy to share pages on social media? It’s probably a data broker. That comments system you can drop at the bottom of your blog? You might want to check that it’s not selling your users’ data. It’s not uncommon for a third party to strike deals with other third parties so that when you add one to your site it will inject the others as well, a practice known as piggybacking. It’s a good idea to run your site through a tool like Blacklight now and then to make sure that nothing surprising is going on (though if you run ads there will only be so much you can do, sadly).

Finally, you of course want to be thinking about your users, but you should also be thinking about yourself! The business implications of sending your audience data to third parties are often poorly understood and are too rarely taken into account. Understanding your users, your readers, your customers is a key business asset. When you share your audience data with third parties, they benefit from that too — and they can use that data to compete with you.

If you run a shoe store and let a social network track your users so you can target ads to them there later, know that that data, which reveals who is interested in shoes, will also be used to show them shoe ads for your competitors.

If you host your e-commerce pages on a virtual strip mall owned by a company that also runs its own online shopping business, how long will it be before they use what they learn from your customers to outcompete you?

Privacy isn’t just about ethics and earning the trust of your readers: it’s also a sound business strategy when, willingly or not, you participate in the data economy.

And How About We Fixed The Web, Too?

As a community, we can each work to improve our own little corners of the Web. But, collectively, we can do better. We can improve the Web and make it a better platform for privacy.

Perhaps the most important property of the Web is trust. You can browse around freely from site to site because you can trust that your browser will protect your security and that, even as those sites run code on your computer, they won’t endanger it. That is a strong promise, much stronger than what you can expect from native platforms, but when it comes to privacy it’s a promise that we have broken. As you browse freely from site to site, your privacy is not in trustworthy hands.

Still, things are looking up. Most browsers have delivered excellent work towards preventing tracking on the Web, and the biggest holdout, Chrome, has promised change in 2023. Projects like the Global Privacy Control are making headway. As third-party cookies slowly become extinct, industry stakeholders are working together to propose privacy-preserving standards that enable businesses to function on the Web without infringing on people’s privacy.

Detailing all the proposals on the table would require a whole other article, but Apple’s Private Click Measurement, Google’s FLEDGE, Microsoft’s PARAKEET, or, if you’ll allow me this shameless plug, The New York Times’s Garuda are all worth looking at, as is the work taking place in the Privacy CG. Some of the proposals discussed there, like Federated Learning of Cohorts (FLoC), have run into trouble, but that only underscores the value in building a solid understanding of privacy in the Web community in order to develop these novel solutions.

As much as we’d all love to engineer our way out of these complex problems, that’s rarely possible. Solutions will require cooperation between technologists and policymakers. As technologists, there are several ways in which we can help. We can act as citizens and take part in policy debates. We can describe our systems in understandable terms, and explain what is riding on them. (You’d be surprised at how many bad descriptions of cookies there can be.) We can use our understanding of technology to try to explore how what we build can create problems when deployed at large scales.

Most importantly, when technology fails society we can make it our responsibility to imagine other ways in which it could work — even if they seem out of immediate reach. Technology is often presented as inevitable as if its current design were the only rational option rather than the accumulation of arbitrary decisions that it is. We hold large, often untapped power in our ability simply to say that “it doesn’t have to be this way” and to show what other paths exist.

We build for users, not to milk them of their data. The Web has made it hard for them to stand for themselves — it’s on us to do it for them. Few of us who work on commercial sites will be able to produce perfect privacy outcomes immediately, but this should not stop us from doing better. The tide has turned and a privacy-friendly Web now seems possible. We might yet get to check one of those big, basic questions off the list.

Further Reading

  • A great book to read to understand how privacy works is Helen Nissenbaum’s Privacy in Context. A shorter overview is available in Matt Salganik’s Bit by Bit which you can read online.
  • Privacy is Power by Carissa Véliz offers an effective and well-documented overview of why privacy matters.
  • James C. Scott’s classic Seeing Like A State presents a dire overview of how society-level engineering can fail, often in catastrophic ways, which includes an extensive description of the problems brought about by “legibility”, which is what collective infringement of privacy leads to.
  • Maria Farrell’s This Is Your Phone On Feminism is an outstanding description of how we love our devices but don’t trust them, and of how love without trust is the definition of an abusive relationship.
  • The W3C’s Technical Architecture Group (TAG) is working on a set of privacy definitions to help support discussions in the Web community. The output from that isn’t baked yet, but it is being built based on a blend of the Principles of User Privacy (PUP) and the Target Privacy Threat Model.
  • In this article, I could only cover some of the basics, but one important concern in privacy is how data collection affects us at the collective instead of the individual level that we too often fixate on. Salomé Viljoen’s Democratic Data covers that issue very well.
  • Woodrow Hartzog and Neil Richards have written so many excellent articles on privacy that it’s hard to pick a favorite, but I would suggest Taking Trust Seriously In Privacy Law as a great place to start. Don’t be daunted by the “law” part, it’s really about trust.
  • Looking at a broader issue, Re-Engineering Humanity, by Brett Frischmann and Evan Selinger, is a great description of how we can misuse technology to shape people against their interests.
  • More on the advertising side, Subprime Attention Crisis by Tim Hwang explains why we should worry about online advertising and the businesses it supports.

Hello I’m a very beginner I need help in my c++ program

  1. Create an array of integers and initialize/assign random values to each element.
  2. Allow the user to input an integer.
  3. If the user input is present inside the array elements, display/print its index number, if not display/print "VALUE NOT FOUND"

I appreciate if you would help thanks. I really don't know hwo to code yet and our prof is assigning us activities already pleas eocmment down bellow thank you