Turn off WiFi if there is no user initiated network access
This is neither practical nor feasible.
Not practical.
So, in your scenario, the WiFi connection drops as soon as you load your webpage and theoretically, the computer is now waiting for you to click on something to reconnect.  Here are just two (off the top of my head) problems with that scenario:
Auto Refresh
A small piece of code embedded within the meta tags of the HTML code will auto refresh that page:
&lt;meta http-equiv=&quot;refresh&quot; content=&quot;5&quot; &gt;

This is equivalent to hitting refresh.  How is the OS supposed to distinguish between a user generated refresh and one generated in meta?  That's a lot of keyboard trapping.
HTTP Sessions.  Depending on the website you visit, they may be employing the use of cookies that track user sessions - especially so if you log in.  Once you disconnect from the network, your session will expire requiring a new login.  There is no &quot;trapping&quot; on the client side for this because it's a server generated session/cookie.

Not feasible.
For all intents and purposes your network settings and your browser session are &quot;sandboxed&quot; from each other.  Could you imagine the chaos you could cause by having an app or (worse) a browser's extension with the ability to affect the state of hardware based on what you click?  This would be an attacker's dream scenario.
Additionally, WiFi (and Bluetooth) antennas are in the LCD enclosure, not the bottom of the laptop.  So, unless you are wearing shorts made of lead or lined with a highly reflective material (reflecting out, of course), you are fully exposed to WiFi signals since they are omni directional.