After some trial and error, I managed to find a solution to my issue. The key was removing the default close button and creating a custom one instead. Hopefully, this information will benefit others facing a similar challenge. Using the data-close-btn attribute disables the default close button.
The data-icon attribute simply instructs it to utilize the custom icon, which is much simpler than I initially thought.
#btnCancel .ui-btn-inner {
width: 33px;
height: 35px;
margin: 0px;
border: none !important;
background: transparent !important;
}
.ui-icon-custom
{
background-image: url(../images/image.png) !important;
background-position: 0px -84px;
width: 33px;
height: 35px;
margin: 0 !important;
box-shadow:none;
}
<html>
<head>
<title>Change Language</title>
</head>
<body>
<div data-role="page" id="changeLanguage" data-close-btn="none">
<header data-role="header">
<h1 data-translation-key="choose language" ></h1>
<a id="btnCancel" class="ui-btn-left" data-icon="custom" data-rel="back" data- iconpos="notext" ></a>
</header>
<div data-role="content">
<p data-translation-key="pick language"></p>
<ul id="languageSelection"></ul>
</div>
<p class="version"></p>
</div>
</body>
</html>