DEV Community

Der Sascha
Der Sascha

Posted on • Originally published at blog.bajonczak.com on

How To: Modifing the tab order in Azure B2C login Screen

How To: Modifing the tab order in Azure B2C login Screen

Azure B2C is a very cool tool to integrate external users into your organization. But it comes up sometimes with small bugs. One of them is the reordering of the Tab-flow.

This article will introduce you to the problem and how I solved this.

The Problem

The Problem is the tab-flow. Look here










0:00
/0:05








Now our mission is to fix this on our own :)

Identify the Components to reorder

The very first step is to identify which fields to reorder. For this, I open up the F12 Developer toolbar and search for the id's the controls

How To: Modifing the tab order in Azure B2C login Screen

So in my case I got the following controls

  • email
  • password
  • forgotPassword
  • next

Write the Javascript to do the magic

Any magic will be done via JavaScript in the web world. So here the Javascript that I generated to achieve my goal:

<script>
        document.getElementById("email").tabIndex = "1";
        document.getElementById("password").tabIndex="2";
        document.getElementById("forgotPassword").tabIndex="3";
        document.getElementById("next").tabIndex="4"; 
</script>
Enter fullscreen mode Exit fullscreen mode

Integrate JavaScript

In your custom Page HTML you can add the script to the bottom of the HTML, before the

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay